mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Reimplement MD021/no-multiple-space-closed-atx using micromark tokens.
This commit is contained in:
parent
e3ca9b1755
commit
0b165c1566
8 changed files with 393 additions and 219 deletions
|
|
@ -167,8 +167,8 @@ test("resultFormattingV1", (t) => new Promise((resolve) => {
|
|||
"Multiple spaces inside hashes on closed atx style heading",
|
||||
"ruleInformation": `${homepage}/blob/v${version}/doc/md021.md`,
|
||||
"errorDetail": null,
|
||||
"errorContext": "# Multiple spa...tyle heading #",
|
||||
"errorRange": [ 1, 4 ] }
|
||||
"errorContext": "# Multiple spaces inside hash...",
|
||||
"errorRange": [ 3, 1 ] }
|
||||
],
|
||||
"./test/atx_heading_spacing.md": [
|
||||
{ "lineNumber": 1,
|
||||
|
|
@ -237,7 +237,7 @@ test("resultFormattingV1", (t) => new Promise((resolve) => {
|
|||
" [Context: \"## Heading\"]\n" +
|
||||
"truncate: 1: MD021/no-multiple-space-closed-atx" +
|
||||
" Multiple spaces inside hashes on closed atx style heading" +
|
||||
" [Context: \"# Multiple spa...tyle heading #\"]";
|
||||
" [Context: \"# Multiple spaces inside hash...\"]";
|
||||
t.is(actualMessage, expectedMessage, "Incorrect message.");
|
||||
resolve();
|
||||
});
|
||||
|
|
@ -270,8 +270,8 @@ test("resultFormattingV2", (t) => new Promise((resolve) => {
|
|||
"Multiple spaces inside hashes on closed atx style heading",
|
||||
"ruleInformation": `${homepage}/blob/v${version}/doc/md021.md`,
|
||||
"errorDetail": null,
|
||||
"errorContext": "# Multiple spa...tyle heading #",
|
||||
"errorRange": [ 1, 4 ] }
|
||||
"errorContext": "# Multiple spaces inside hash...",
|
||||
"errorRange": [ 3, 1 ] }
|
||||
],
|
||||
"./test/atx_heading_spacing.md": [
|
||||
{ "lineNumber": 1,
|
||||
|
|
@ -336,7 +336,7 @@ test("resultFormattingV2", (t) => new Promise((resolve) => {
|
|||
" [Context: \"## Heading\"]\n" +
|
||||
"truncate: 1: MD021/no-multiple-space-closed-atx" +
|
||||
" Multiple spaces inside hashes on closed atx style heading" +
|
||||
" [Context: \"# Multiple spa...tyle heading #\"]";
|
||||
" [Context: \"# Multiple spaces inside hash...\"]";
|
||||
t.is(actualMessage, expectedMessage, "Incorrect message.");
|
||||
resolve();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue