mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-01-01 21:48:49 +01: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
|
|
@ -7,7 +7,7 @@
|
|||
* Alpha
|
||||
* Bravo
|
||||
|
||||
- Charlie
|
||||
* Charlie
|
||||
|
||||
* Delta
|
||||
* Echo
|
||||
|
|
|
|||
|
|
@ -459,7 +459,7 @@ test("applyFix", (t) => {
|
|||
});
|
||||
|
||||
test("applyFixes", (t) => {
|
||||
t.plan(29);
|
||||
t.plan(30);
|
||||
const testCases = [
|
||||
[
|
||||
"Hello world.",
|
||||
|
|
@ -905,6 +905,27 @@ test("applyFixes", (t) => {
|
|||
}
|
||||
],
|
||||
""
|
||||
],
|
||||
[
|
||||
" hello world",
|
||||
[
|
||||
{
|
||||
"lineNumber": 1,
|
||||
"fixInfo": {
|
||||
"editColumn": 1,
|
||||
"deleteCount": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"lineNumber": 1,
|
||||
"fixInfo": {
|
||||
"editColumn": 2,
|
||||
"deleteCount": 1,
|
||||
"insertText": "H"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Hello world"
|
||||
]
|
||||
];
|
||||
testCases.forEach((testCase) => {
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"default": true,
|
||||
"MD004": {
|
||||
"style": "sublist"
|
||||
}
|
||||
}
|
||||
|
|
@ -47,12 +47,18 @@
|
|||
- item
|
||||
* item
|
||||
* item {MD004}
|
||||
+ item
|
||||
+ item {MD004}
|
||||
|
||||
- item
|
||||
* item
|
||||
+ item
|
||||
- item
|
||||
* item
|
||||
- item {MD004}
|
||||
+ item
|
||||
- item
|
||||
+ item {MD004}
|
||||
|
||||
<!-- markdownlint-configure-file {
|
||||
"ul-style": {
|
||||
"style": "sublist"
|
||||
}
|
||||
} -->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue