mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 14:30:12 +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
18
lib/cache.js
18
lib/cache.js
|
|
@ -2,6 +2,14 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
let codeBlockAndSpanRanges = null;
|
||||
module.exports.codeBlockAndSpanRanges = (value) => {
|
||||
if (value) {
|
||||
codeBlockAndSpanRanges = value;
|
||||
}
|
||||
return codeBlockAndSpanRanges;
|
||||
};
|
||||
|
||||
let flattenedLists = null;
|
||||
module.exports.flattenedLists = (value) => {
|
||||
if (value) {
|
||||
|
|
@ -10,14 +18,6 @@ module.exports.flattenedLists = (value) => {
|
|||
return flattenedLists;
|
||||
};
|
||||
|
||||
let inlineCodeSpanRanges = null;
|
||||
module.exports.inlineCodeSpanRanges = (value) => {
|
||||
if (value) {
|
||||
inlineCodeSpanRanges = value;
|
||||
}
|
||||
return inlineCodeSpanRanges;
|
||||
};
|
||||
|
||||
let lineMetadata = null;
|
||||
module.exports.lineMetadata = (value) => {
|
||||
if (value) {
|
||||
|
|
@ -27,7 +27,7 @@ module.exports.lineMetadata = (value) => {
|
|||
};
|
||||
|
||||
module.exports.clear = () => {
|
||||
codeBlockAndSpanRanges = null;
|
||||
flattenedLists = null;
|
||||
inlineCodeSpanRanges = null;
|
||||
lineMetadata = null;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue