Group items in "Related" section of README.md by category.

This commit is contained in:
David Anson 2020-06-22 20:59:13 -07:00
parent 53a0ba18d8
commit e1772ddc51
2 changed files with 23 additions and 12 deletions

View file

@ -32,16 +32,21 @@ and test cases came directly from that project.
### Related ### Related
* CLI
* [markdownlint-cli command-line interface for Node.js](https://github.com/igorshubovych/markdownlint-cli) * [markdownlint-cli command-line interface for Node.js](https://github.com/igorshubovych/markdownlint-cli)
* [GitHub Actions problem matcher for markdownlint-cli](https://github.com/xt0rted/markdownlint-problem-matcher) * GitHub
* [grunt-markdownlint for the Grunt task runner](https://github.com/sagiegurari/grunt-markdownlint)
* [vscode-markdownlint extension for VS Code](https://marketplace.visualstudio.com/items/DavidAnson.vscode-markdownlint)
* [GitHub Super-Linter Action](https://github.com/github/super-linter) * [GitHub Super-Linter Action](https://github.com/github/super-linter)
* [GitHub Actions problem matcher for markdownlint-cli](https://github.com/xt0rted/markdownlint-problem-matcher)
* Editor
* [vscode-markdownlint extension for VS Code](https://marketplace.visualstudio.com/items/DavidAnson.vscode-markdownlint)
* [Sublime Text markdownlint for Sublime Text](https://packagecontrol.io/packages/SublimeLinter-contrib-markdownlint) * [Sublime Text markdownlint for Sublime Text](https://packagecontrol.io/packages/SublimeLinter-contrib-markdownlint)
* [linter-node-markdownlint extension for Atom](https://atom.io/packages/linter-node-markdownlint) * [linter-node-markdownlint extension for Atom](https://atom.io/packages/linter-node-markdownlint)
* [coc-markdownlint extension for Vim/Neovim](https://github.com/fannheyward/coc-markdownlint) * [coc-markdownlint extension for Vim/Neovim](https://github.com/fannheyward/coc-markdownlint)
* [markdownlint/mdl gem for Ruby](https://rubygems.org/gems/mdl) * Tooling
* [grunt-markdownlint for the Grunt task runner](https://github.com/sagiegurari/grunt-markdownlint)
* [Cake.Markdownlint addin for Cake build automation system](https://github.com/cake-contrib/Cake.Markdownlint) * [Cake.Markdownlint addin for Cake build automation system](https://github.com/cake-contrib/Cake.Markdownlint)
* Ruby
* [markdownlint/mdl gem for Ruby](https://rubygems.org/gems/mdl)
## Demonstration ## Demonstration

View file

@ -1450,7 +1450,10 @@ tape("readme", (test) => {
let seenTags = false; let seenTags = false;
let inTags = false; let inTags = false;
md.parse(contents, {}).forEach(function forToken(token) { md.parse(contents, {}).forEach(function forToken(token) {
if (token.type === "bullet_list_open") { if (
(token.type === "bullet_list_open") &&
(token.level === 0)
) {
if (!seenRelated) { if (!seenRelated) {
seenRelated = true; seenRelated = true;
} else if (seenRelated && !seenRules) { } else if (seenRelated && !seenRules) {
@ -1460,7 +1463,10 @@ tape("readme", (test) => {
seenTags = true; seenTags = true;
inTags = true; inTags = true;
} }
} else if (token.type === "bullet_list_close") { } else if (
(token.type === "bullet_list_close") &&
(token.level === 0)
) {
inRules = false; inRules = false;
inTags = false; inTags = false;
} else if (token.type === "inline") { } else if (token.type === "inline") {