Add "Related" section to README.

This commit is contained in:
David Anson 2016-01-14 22:15:44 -08:00
parent 2ff366e0ee
commit 3e642bc03b
2 changed files with 9 additions and 4 deletions

View file

@ -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

View file

@ -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;
}