mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Remove automatic fix from MD028/no-blanks-blockquote due to ambiguity (fixes #315).
This commit is contained in:
parent
a6d30cb724
commit
09c5736385
4 changed files with 21 additions and 12 deletions
|
@ -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:
|
||||
|
||||
|
|
10
lib/md028.js
10
lib/md028.js
|
@ -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;
|
||||
|
|
|
@ -7,6 +7,7 @@ Text
|
|||
## Another heading
|
||||
|
||||
> Multiple spaces
|
||||
|
||||
> Blank line above
|
||||
|
||||
1. Alpha
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue