Update MD010/no-hard-tabs to allow tabs in code spans when the code_blocks parameter is set to false (for consistency) (fixes #454).

This commit is contained in:
David Anson 2021-12-17 17:24:00 -08:00
parent 0d9dfe7120
commit d57b4770ed
6 changed files with 110 additions and 33 deletions

View file

@ -555,7 +555,7 @@ module.exports.codeBlockAndSpanRanges = (params, lineMetadata) => {
// Add code block ranges (excludes fences)
forEachLine(lineMetadata, (line, lineIndex, inCode, onFence) => {
if (inCode && !onFence) {
exclusions.push(lineIndex, 0, line.length);
exclusions.push([ lineIndex, 0, line.length ]);
}
});
// Add code span ranges (excludes ticks)