Add support for inline comments markdownlint-capture/markdownlint-restore (fixes #194).

This commit is contained in:
David Anson 2019-06-08 19:26:11 -07:00
parent 64351f73be
commit 65052f6200
5 changed files with 167 additions and 15 deletions

View file

@ -12,7 +12,8 @@ module.exports.frontMatterRe =
// Regular expression for matching inline disable/enable comments
const inlineCommentRe =
/<!--\s*markdownlint-(dis|en)able((?:\s+[a-z0-9_-]+)*)\s*-->/ig;
// eslint-disable-next-line max-len
/<!--\s*markdownlint-(disable|enable|capture|restore)((?:\s+[a-z0-9_-]+)*)\s*-->/ig;
module.exports.inlineCommentRe = inlineCommentRe;
// Regular expressions for range matching