mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Update harness.mjs to output micromark token structure.
This commit is contained in:
parent
dce6091503
commit
c8236ed0ea
3 changed files with 32 additions and 43 deletions
|
@ -1479,25 +1479,6 @@ function micromarkParse(markdown) {
|
|||
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