mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-24 01:40: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 { addErrorDetailIf } = require("../helpers");
|
||||
const { filterByTypes, getHeadingLevel, getHeadingStyle, inHtmlFlow } =
|
||||
const { filterByTypes, getHeadingLevel, getHeadingStyle } =
|
||||
require("../helpers/micromark.cjs");
|
||||
|
||||
// eslint-disable-next-line jsdoc/valid-types
|
||||
|
|
@ -24,7 +24,7 @@ module.exports = {
|
|||
if (style === "consistent") {
|
||||
style = styleForToken;
|
||||
}
|
||||
if ((styleForToken !== style) && !inHtmlFlow(heading)) {
|
||||
if (styleForToken !== style) {
|
||||
const h12 = getHeadingLevel(heading) <= 2;
|
||||
const setextWithAtx =
|
||||
(style === "setext_with_atx") &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue