Refactor to remove flattenedLists, indentFor, listItemMarkerRe, orderedListItemMarkerRe, rangeFromRegExp, and unorderedListStyleFor helpers, reimplement MD004/MD029 using micromark tokens.

This commit is contained in:
David Anson 2024-08-20 21:36:17 -07:00
parent 55729cfcf7
commit 7aac5b0553
9 changed files with 318 additions and 482 deletions

View file

@ -594,12 +594,9 @@ function lintContent(
"lines": Object.freeze(lines),
"frontMatterLines": Object.freeze(frontMatterLines)
};
const flattenedLists =
helpers.flattenLists(markdownitTokens);
const referenceLinkImageData =
helpers.getReferenceLinkImageData(micromarkTokens);
cache.set({
flattenedLists,
referenceLinkImageData
});
// Function to run for each rule