mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Update all rules to better handle wrongly-typed configuration parameters.
This commit is contained in:
parent
26ad0550ec
commit
3238ed4249
25 changed files with 134 additions and 39 deletions
|
@ -465,7 +465,7 @@ module.exports.frontMatterHasTitle =
|
|||
const ignoreFrontMatter =
|
||||
(frontMatterTitlePattern !== undefined) && !frontMatterTitlePattern;
|
||||
const frontMatterTitleRe =
|
||||
new RegExp(frontMatterTitlePattern || "^\\s*title\\s*[:=]", "i");
|
||||
new RegExp(String(frontMatterTitlePattern || "^\\s*title\\s*[:=]"), "i");
|
||||
return !ignoreFrontMatter &&
|
||||
frontMatterLines.some((line) => frontMatterTitleRe.test(line));
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue