mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-21 00:10:13 +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
|
|
@ -3,7 +3,7 @@
|
|||
"use strict";
|
||||
|
||||
const { addError, addErrorDetailIf } = require("../helpers");
|
||||
const { filterByTypes } = require("../helpers/micromark.cjs");
|
||||
const { filterByTypes, inHtmlFlow } = require("../helpers/micromark.cjs");
|
||||
|
||||
module.exports = {
|
||||
"names": [ "MD005", "list-indent" ],
|
||||
|
|
@ -13,7 +13,7 @@ module.exports = {
|
|||
const lists = filterByTypes(
|
||||
params.parsers.micromark.tokens,
|
||||
[ "listOrdered", "listUnordered" ]
|
||||
);
|
||||
).filter((list) => !inHtmlFlow(list));
|
||||
for (const list of lists) {
|
||||
const expectedIndent = list.startColumn - 1;
|
||||
let expectedEnd = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue