mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Fix possible exceptions due to addError's range/editColumn out of range, update test-extra to use test.serial() for better progress.
This commit is contained in:
parent
e7d3708056
commit
9b5f6a28f9
8 changed files with 19 additions and 18 deletions
|
|
@ -30,7 +30,7 @@ module.exports = {
|
|||
unorderedListTypes
|
||||
);
|
||||
for (const token of tokens) {
|
||||
const { parent, startColumn, startLine, type } = token;
|
||||
const { endColumn, parent, startColumn, startLine, type } = token;
|
||||
if (type === "blockQuotePrefix") {
|
||||
lastBlockQuotePrefix = token;
|
||||
} else if (type === "listUnordered") {
|
||||
|
|
@ -63,7 +63,7 @@ module.exports = {
|
|||
(lastBlockQuotePrefix.endColumn - 1) :
|
||||
0;
|
||||
const actualIndent = startColumn - 1 - blockQuoteAdjustment;
|
||||
const range = [ 1, startColumn + 1 ];
|
||||
const range = [ 1, endColumn - 1 ];
|
||||
const fixInfo = {
|
||||
"editColumn": startColumn - actualIndent,
|
||||
"deleteCount": Math.max(actualIndent - expectedIndent, 0),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue