Cache results of inlineCodeSpanRanges for use by MD011/MD044.

This commit is contained in:
David Anson 2021-06-17 22:01:27 -07:00
parent 706f48bd25
commit 7d40926367
6 changed files with 56 additions and 39 deletions

View file

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