mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-21 16:30:12 +01:00
Update MD005, MD007, MD022, MD037, MD038 to not report violations within "htmlFlow" context (fixes #999).
This commit is contained in:
parent
2a56f130c1
commit
63325edc97
15 changed files with 511 additions and 149 deletions
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
const { addErrorDetailIf, blockquotePrefixRe, isBlankLine } =
|
||||
require("../helpers");
|
||||
const { filterByTypes, getHeadingLevel } =
|
||||
const { filterByTypes, getHeadingLevel, inHtmlFlow } =
|
||||
require("../helpers/micromark.cjs");
|
||||
|
||||
const defaultLines = 1;
|
||||
|
|
@ -42,7 +42,7 @@ module.exports = {
|
|||
const headings = filterByTypes(
|
||||
parsers.micromark.tokens,
|
||||
[ "atxHeading", "setextHeading" ]
|
||||
);
|
||||
).filter((heading) => !inHtmlFlow(heading));
|
||||
for (const heading of headings) {
|
||||
const { startLine, endLine } = heading;
|
||||
const line = lines[startLine - 1].trim();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue