mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22: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 } = require("../helpers");
|
||||
const { filterByPredicate } = require("../helpers/micromark.cjs");
|
||||
const { filterByPredicate, inHtmlFlow } = require("../helpers/micromark.cjs");
|
||||
|
||||
module.exports = {
|
||||
"names": [ "MD037", "no-space-in-emphasis" ],
|
||||
|
|
@ -31,7 +31,7 @@ module.exports = {
|
|||
const { text, type } = child;
|
||||
if ((type === "data") && (text.length <= 3)) {
|
||||
const emphasisTokens = emphasisTokensByMarker.get(text);
|
||||
if (emphasisTokens) {
|
||||
if (emphasisTokens && !inHtmlFlow(child)) {
|
||||
emphasisTokens.push(child);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue