Fix applyFix handling of multiple line endings; MD022 handling of multiple lines.

This commit is contained in:
David Anson 2019-09-16 22:34:49 -07:00
parent 52939a6d7e
commit 677255a484
5 changed files with 46 additions and 27 deletions

View file

@ -457,7 +457,7 @@ function applyFix(line, fixInfo, lineEnding) {
return (deleteCount === -1) ?
null :
line.slice(0, editIndex) +
insertText.replace("\n", lineEnding) +
insertText.replace(/\n/g, lineEnding) +
line.slice(editIndex + deleteCount);
}
module.exports.applyFix = applyFix;