mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Reimplement inlineCodeSpanRanges as codeBlockAndSpanRanges to fix an issue with unterminated code spans (and for flexibility).
This commit is contained in:
parent
9c60343692
commit
1e82f76596
12 changed files with 178 additions and 71 deletions
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
const { addErrorDetailIf, bareUrlRe, escapeForRegExp, forEachLine,
|
||||
overlapsAnyRange, linkRe, linkReferenceRe } = require("../helpers");
|
||||
const { inlineCodeSpanRanges, lineMetadata } = require("./cache");
|
||||
const { codeBlockAndSpanRanges, lineMetadata } = require("./cache");
|
||||
|
||||
module.exports = {
|
||||
"names": [ "MD044", "proper-names" ],
|
||||
|
|
@ -36,7 +36,7 @@ module.exports = {
|
|||
}
|
||||
});
|
||||
if (!includeCodeBlocks) {
|
||||
exclusions.push(...inlineCodeSpanRanges());
|
||||
exclusions.push(...codeBlockAndSpanRanges());
|
||||
}
|
||||
for (const name of names) {
|
||||
const escapedName = escapeForRegExp(name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue