Fix range calculation in MD033/no-inline-html during re-parse of tabbed content.

This commit is contained in:
David Anson 2023-01-21 18:57:09 -08:00
parent 48a92d41a4
commit c53df8b720
7 changed files with 65 additions and 6 deletions

View file

@ -42,12 +42,15 @@ module.exports = {
"extensions": [
{
"disable": {
"null": [ "htmlFlow" ]
"null": [ "codeIndented", "htmlFlow" ]
}
}
]
};
const flowTokens = parse(token.text, options);
// Use lines instead of token.text for accurate columns
const lines =
params.lines.slice(token.startLine - 1, token.endLine).join("\n");
const flowTokens = parse(lines, options);
pending.push(
[ token.startLine - 1, flowTokens ]
);