Reimplement MD007/ul-indent using micromark tokens, reduce the length of fix edits (fixes #969).

This commit is contained in:
David Anson 2023-10-15 21:24:59 -07:00
parent cdf0818752
commit da17cec722
11 changed files with 1138 additions and 238 deletions

63
test/lists-on-a-line.md Normal file
View file

@ -0,0 +1,63 @@
# Lists on a Line
## Correct
Text
* * Item
Text
* * * Item
Text
- + * Item
Text
- 1. Item
Text
- 1. + Item
Text
* * * Item
* Item
* Item
* Item
## Incorrect
Text
* * Item {MD007}
Text
* * * Item {MD007}
Text
- + * Item {MD007}
Text
- 1. Item {MD007}
Text
- 1. + Item {MD007}
Text
* * * Item {MD007}
* Item {MD005} {MD007}
* Item {MD005} {MD007}
* Item {MD005} {MD007}
<!-- markdownlint-configure-file {
"ul-style": false
} -->

View file

@ -914,7 +914,7 @@ test("readme", async(t) => {
});
test("validateJsonUsingConfigSchemaStrict", async(t) => {
t.plan(161);
t.plan(162);
const { addSchema, validate } =
// eslint-disable-next-line n/file-extension-in-import
await import("@hyperjump/json-schema/draft-07");

File diff suppressed because it is too large Load diff

View file

@ -37,7 +37,10 @@ Generated by [AVA](https://avajs.dev).
> Expected linting violations
''
`test-repos/mdn-content/files/en-us/web/svg/attribute/d/index.md: 234: MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 10]␊
test-repos/mdn-content/files/en-us/web/svg/attribute/d/index.md: 556: MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 12]␊
test-repos/mdn-content/files/en-us/web/svg/attribute/d/index.md: 769: MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 12]␊
test-repos/mdn-content/files/en-us/web/svg/attribute/d/index.md: 838: MD007/ul-indent Unordered list indentation [Expected: 0; Actual: 12]`
## https://github.com/mkdocs/mkdocs

File diff suppressed because it is too large Load diff