Reimplement inlineCodeSpanRanges as codeBlockAndSpanRanges to fix an issue with unterminated code spans (and for flexibility).

This commit is contained in:
David Anson 2021-11-23 04:40:05 +00:00 committed by GitHub
parent 9c60343692
commit 1e82f76596
12 changed files with 178 additions and 71 deletions

View file

@ -515,7 +515,9 @@ function lintContent(
};
cache.lineMetadata(helpers.getLineMetadata(params));
cache.flattenedLists(helpers.flattenLists(params.tokens));
cache.inlineCodeSpanRanges(helpers.inlineCodeSpanRanges(params.lines));
cache.codeBlockAndSpanRanges(
helpers.codeBlockAndSpanRanges(params, cache.lineMetadata())
);
// Function to run for each rule
const result = (resultVersion === 0) ? {} : [];
// eslint-disable-next-line jsdoc/require-jsdoc