mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Update MD004/ul-style to auto-fix violations (fixes #351).
This commit is contained in:
parent
5aef3a4a51
commit
ed325ebb56
8 changed files with 113 additions and 37 deletions
|
@ -723,8 +723,9 @@ module.exports.applyFixes = function applyFixes(input, errors) {
|
|||
const editIndex = editColumn - 1;
|
||||
if (
|
||||
(lineIndex !== lastLineIndex) ||
|
||||
((editIndex + deleteCount) < lastEditIndex) ||
|
||||
(deleteCount === -1)
|
||||
(deleteCount === -1) ||
|
||||
((editIndex + deleteCount) <=
|
||||
(lastEditIndex - ((deleteCount > 0) ? 0 : 1)))
|
||||
) {
|
||||
lines[lineIndex] = applyFix(lines[lineIndex], fixInfo, lineEnding);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue