mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-22 17:00: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
|
|
@ -3,7 +3,7 @@
|
|||
"use strict";
|
||||
|
||||
const { addError, addErrorDetailIf } = require("../helpers");
|
||||
const { filterByTypes, inHtmlFlow } = require("../helpers/micromark.cjs");
|
||||
const { filterByTypes } = require("../helpers/micromark.cjs");
|
||||
|
||||
// eslint-disable-next-line jsdoc/valid-types
|
||||
/** @type import("./markdownlint").Rule */
|
||||
|
|
@ -21,7 +21,7 @@ module.exports = {
|
|||
const lists = filterByTypes(
|
||||
micromarkTokens,
|
||||
[ "listOrdered", "listUnordered" ]
|
||||
).filter((list) => !inHtmlFlow(list));
|
||||
);
|
||||
for (const list of lists) {
|
||||
const expectedIndent = list.startColumn - 1;
|
||||
let expectedEnd = 0;
|
||||
|
|
@ -38,8 +38,8 @@ module.exports = {
|
|||
lineNumber,
|
||||
expectedIndent,
|
||||
actualIndent,
|
||||
null,
|
||||
null,
|
||||
undefined,
|
||||
undefined,
|
||||
range
|
||||
// No fixInfo; MD007 handles this scenario better
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue