mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-21 21:30:47 +02:00
Add TOML title syntax to MD041/first-line-h1 default RegExp (fixes #77).
This commit is contained in:
parent
77e27cbe09
commit
0c38635afe
7 changed files with 26 additions and 4 deletions
|
@ -1045,7 +1045,7 @@ module.exports = [
|
|||
var frontMatterTitle = params.options.front_matter_title;
|
||||
var tag = "h" + level;
|
||||
var frontMatterTitleRe =
|
||||
new RegExp(frontMatterTitle || "^\\s*title:", "i");
|
||||
new RegExp(frontMatterTitle || "^\\s*title\\s*[:=]", "i");
|
||||
params.tokens.every(function forToken(token, index) {
|
||||
if (token.type === "heading_open") {
|
||||
if (!((token.lineNumber === 1) || (index > 0)) ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue