mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Fix array indexing for markdownlint-disable-next-line when front matter is present.
This commit is contained in:
parent
7a76f1d22d
commit
5253669495
3 changed files with 26 additions and 4 deletions
|
@ -1305,8 +1305,9 @@ function getEnabledRulesPerLineNumber(ruleList, lines, frontMatterLines, noInlin
|
|||
// eslint-disable-next-line jsdoc/require-jsdoc
|
||||
function disableNextLine(action, parameter, lineNumber) {
|
||||
if (action === "DISABLE-NEXT-LINE") {
|
||||
enabledRulesPerLineNumber[lineNumber + 1] =
|
||||
applyEnableDisable(action, parameter, enabledRulesPerLineNumber[lineNumber + 1] || {});
|
||||
var nextLineNumber = frontMatterLines.length + lineNumber + 1;
|
||||
enabledRulesPerLineNumber[nextLineNumber] =
|
||||
applyEnableDisable(action, parameter, enabledRulesPerLineNumber[nextLineNumber] || {});
|
||||
}
|
||||
}
|
||||
// Handle inline comments
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue