mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Cache results of inlineCodeSpanRanges for use by MD011/MD044.
This commit is contained in:
parent
706f48bd25
commit
7d40926367
6 changed files with 56 additions and 39 deletions
|
|
@ -3,9 +3,8 @@
|
|||
"use strict";
|
||||
|
||||
const { addErrorDetailIf, bareUrlRe, escapeForRegExp, forEachLine,
|
||||
inlineCodeSpanRanges, overlapsAnyRange, linkRe, linkReferenceRe } =
|
||||
require("../helpers");
|
||||
const { lineMetadata } = require("./cache");
|
||||
overlapsAnyRange, linkRe, linkReferenceRe } = require("../helpers");
|
||||
const { inlineCodeSpanRanges, lineMetadata } = require("./cache");
|
||||
|
||||
module.exports = {
|
||||
"names": [ "MD044", "proper-names" ],
|
||||
|
|
@ -37,7 +36,7 @@ module.exports = {
|
|||
}
|
||||
});
|
||||
if (!includeCodeBlocks) {
|
||||
exclusions.push(...inlineCodeSpanRanges(params.lines));
|
||||
exclusions.push(...inlineCodeSpanRanges());
|
||||
}
|
||||
for (const name of names) {
|
||||
const escapedName = escapeForRegExp(name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue