Add support for "markdownlint-configure-file" inline comments (fixes #264).

This commit is contained in:
David Anson 2020-04-05 19:47:12 -07:00
parent dd66a33d75
commit 6ce426cf88
7 changed files with 183 additions and 56 deletions

View file

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