mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Refactor to remove forEachLine and getLineMetadata helpers, reimplement MD012/MD018/MD020/MD031 using micromark tokens.
This commit is contained in:
parent
7efc2605b1
commit
c8fd9eb4b3
13 changed files with 198 additions and 308 deletions
|
|
@ -594,15 +594,12 @@ function lintContent(
|
|||
"lines": Object.freeze(lines),
|
||||
"frontMatterLines": Object.freeze(frontMatterLines)
|
||||
};
|
||||
const lineMetadata =
|
||||
helpers.getLineMetadata(paramsBase);
|
||||
const flattenedLists =
|
||||
helpers.flattenLists(markdownitTokens);
|
||||
const referenceLinkImageData =
|
||||
helpers.getReferenceLinkImageData(micromarkTokens);
|
||||
cache.set({
|
||||
flattenedLists,
|
||||
lineMetadata,
|
||||
referenceLinkImageData
|
||||
});
|
||||
// Function to run for each rule
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue