Update MD009/no-trailing-spaces to remove unnecessary sorting, add additional test cases.

This commit is contained in:
David Anson 2022-06-16 04:48:51 +00:00 committed by GitHub
parent f284233f9a
commit 54acae87ea
5 changed files with 79 additions and 4 deletions

View file

@ -32,7 +32,6 @@ module.exports = {
paragraphLineNumbers.push(i + 1);
}
});
paragraphLineNumbers.sort(numericSortAscending);
filterTokens(params, "inline", (token) => {
if (token.children.some((child) => child.type === "code_inline")) {
const tokenLines = params.lines.slice(token.map[0], token.map[1]);
@ -44,7 +43,6 @@ module.exports = {
});
}
});
codeInlineLineNumbers.sort(numericSortAscending);
}
const expected = (brSpaces < 2) ? 0 : brSpaces;
forEachLine(lineMetadata(), (line, lineIndex, inCode) => {