mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Group items in "Related" section of README.md by category.
This commit is contained in:
parent
53a0ba18d8
commit
e1772ddc51
2 changed files with 23 additions and 12 deletions
|
|
@ -1450,7 +1450,10 @@ tape("readme", (test) => {
|
|||
let seenTags = false;
|
||||
let inTags = false;
|
||||
md.parse(contents, {}).forEach(function forToken(token) {
|
||||
if (token.type === "bullet_list_open") {
|
||||
if (
|
||||
(token.type === "bullet_list_open") &&
|
||||
(token.level === 0)
|
||||
) {
|
||||
if (!seenRelated) {
|
||||
seenRelated = true;
|
||||
} else if (seenRelated && !seenRules) {
|
||||
|
|
@ -1460,7 +1463,10 @@ tape("readme", (test) => {
|
|||
seenTags = true;
|
||||
inTags = true;
|
||||
}
|
||||
} else if (token.type === "bullet_list_close") {
|
||||
} else if (
|
||||
(token.type === "bullet_list_close") &&
|
||||
(token.level === 0)
|
||||
) {
|
||||
inRules = false;
|
||||
inTags = false;
|
||||
} else if (token.type === "inline") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue