Remove automatic fix from MD028/no-blanks-blockquote due to ambiguity (fixes #315).

This commit is contained in:
David Anson 2020-11-23 14:57:19 -08:00
parent a6d30cb724
commit 09c5736385
4 changed files with 21 additions and 12 deletions

View file

@ -960,8 +960,6 @@ Tags: blockquote, whitespace
Aliases: no-blanks-blockquote
Fixable: Most violations can be fixed by tooling
This rule is triggered when two blockquote blocks are separated by nothing
except for a blank line:

View file

@ -18,15 +18,7 @@ module.exports = {
let lineNumber = prevLineNumber;
lineNumber < token.lineNumber;
lineNumber++) {
addError(
onError,
lineNumber,
null,
null,
null,
{
"deleteCount": -1
});
addError(onError, lineNumber);
}
}
prevToken = token;

View file

@ -7,6 +7,7 @@ Text
## Another heading
> Multiple spaces
> Blank line above
1. Alpha

View file

@ -458,7 +458,7 @@ tape("applyFix", (test) => {
});
tape("applyFixes", (test) => {
test.plan(28);
test.plan(29);
const testCases = [
[
"Hello world.",
@ -886,6 +886,24 @@ tape("applyFixes", (test) => {
}
],
"Hello\r\nworld\r\n\r\n"
],
[
"Hello world",
[
{
"lineNumber": 1,
"fixInfo": {
"insertText": "x"
}
},
{
"lineNumber": 1,
"fixInfo": {
"deleteCount": -1
}
}
],
""
]
];
testCases.forEach((testCase) => {