mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Fix applyFix handling of multiple line endings; MD022 handling of multiple lines.
This commit is contained in:
parent
52939a6d7e
commit
677255a484
5 changed files with 46 additions and 27 deletions
|
@ -1946,7 +1946,7 @@ module.exports.getPreferredLineEnding = function getPreferredLineEnding(test) {
|
|||
};
|
||||
|
||||
module.exports.applyFixes = function applyFixes(test) {
|
||||
test.expect(27);
|
||||
test.expect(28);
|
||||
const testCases = [
|
||||
[
|
||||
"Hello world.",
|
||||
|
@ -2361,6 +2361,19 @@ module.exports.applyFixes = function applyFixes(test) {
|
|||
}
|
||||
],
|
||||
"Hello\rworld\rhello\rworld\r"
|
||||
],
|
||||
[
|
||||
"Hello\r\nworld",
|
||||
[
|
||||
{
|
||||
"lineNumber": 2,
|
||||
"fixInfo": {
|
||||
"editColumn": 6,
|
||||
"insertText": "\n\n"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Hello\r\nworld\r\n\r\n"
|
||||
]
|
||||
];
|
||||
testCases.forEach((testCase) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue