mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Update MD044/proper-names to parse into micromark htmlFlow tokens for better behavior when html_elements is false (fixes #832).
This commit is contained in:
parent
8cb6b8eff5
commit
b1eff75034
8 changed files with 386 additions and 25 deletions
|
|
@ -105,6 +105,25 @@ function micromarkParse(markdown, options = {}, refsDefined = true) {
|
|||
return document;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Log the structure of a Micromark token list.
|
||||
// *
|
||||
// * @param {Token[]} tokens Micromark tokens.
|
||||
// * @param {number} depth Tree depth.
|
||||
// * @returns {void}
|
||||
// */
|
||||
// function consoleLogTokens(tokens, depth = 0) {
|
||||
// for (const token of tokens) {
|
||||
// const { children, text, type } = token;
|
||||
// console.log(
|
||||
// `${" ".repeat(depth * 2)}${type} ${text.replace(/\n/g, "\\n")}`
|
||||
// );
|
||||
// if (children.length > 0) {
|
||||
// consoleLogTokens(children, depth + 1);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* Filter a list of Micromark tokens by predicate.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue