mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Add "Related" section to README.
This commit is contained in:
parent
2ff366e0ee
commit
3e642bc03b
2 changed files with 9 additions and 4 deletions
|
@ -30,8 +30,10 @@ was inspired by - and heavily influenced by - Mark Harrison's
|
|||
[Ruby](https://www.ruby-lang.org/). The rules, rule documentation, and test
|
||||
cases come directly from that project.
|
||||
|
||||
> If you need a Ruby implementation or a [CLI](http://en.wikipedia.org/wiki/Command-line_interface),
|
||||
> please consider the [mdl](https://rubygems.org/gems/mdl) gem.
|
||||
### Related
|
||||
|
||||
* [vscode-markdownlint extension for VS Code](https://marketplace.visualstudio.com/items/DavidAnson.vscode-markdownlint)
|
||||
* [markdownlint/mdl gem for Ruby](https://rubygems.org/gems/mdl)
|
||||
|
||||
## Demonstration
|
||||
|
||||
|
|
|
@ -755,16 +755,19 @@ module.exports.readme = function readme(test) {
|
|||
function readFile(err, contents) {
|
||||
test.ifError(err);
|
||||
var rulesLeft = rules.slice();
|
||||
var seenRelated = false;
|
||||
var seenRules = false;
|
||||
var inRules = false;
|
||||
var seenTags = false;
|
||||
var inTags = false;
|
||||
md.parse(contents, {}).forEach(function forToken(token) {
|
||||
if (token.type === "bullet_list_open") {
|
||||
if (!seenRules) {
|
||||
if (!seenRelated) {
|
||||
seenRelated = true;
|
||||
} else if (seenRelated && !seenRules) {
|
||||
seenRules = true;
|
||||
inRules = true;
|
||||
} else if (!seenTags) {
|
||||
} else if (seenRelated && seenRules && !seenTags) {
|
||||
seenTags = true;
|
||||
inTags = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue