mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Refactor micromark token handling to remove optional Token.htmlFlowChildren property and make related code more efficient for a ~6% elapsed time reduction.
This commit is contained in:
parent
e282874fe3
commit
24c97a54fb
16 changed files with 274 additions and 283 deletions
|
@ -46,7 +46,9 @@ module.exports = {
|
|||
const topLevelLists = filterByPredicate(
|
||||
parsers.micromark.tokens,
|
||||
isList,
|
||||
(token) => (isList(token) ? [] : token.children)
|
||||
(token) => (
|
||||
(isList(token) || (token.type === "htmlFlow")) ? [] : token.children
|
||||
)
|
||||
);
|
||||
for (const list of topLevelLists) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue