mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-23 01:10:13 +01:00
Exclude htmlFlow content by default for filterByTypes, opt in as needed.
This commit is contained in:
parent
ea9659841e
commit
12502f6571
18 changed files with 206 additions and 129 deletions
|
|
@ -23,7 +23,7 @@ module.exports = {
|
|||
if ((token.type === "atxHeading") || (token.type === "setextHeading")) {
|
||||
isError = (getHeadingLevel(token) !== level);
|
||||
} else if (token.type === "htmlFlow") {
|
||||
const htmlTexts = filterByTypes(token.children, [ "htmlText" ]);
|
||||
const htmlTexts = filterByTypes(token.children, [ "htmlText" ], true);
|
||||
const tagInfo = (htmlTexts.length > 0) && getHtmlTagInfo(htmlTexts[0]);
|
||||
isError = !tagInfo || (tagInfo.name.toLowerCase() !== `h${level}`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue