mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01: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
|
[Ruby](https://www.ruby-lang.org/). The rules, rule documentation, and test
|
||||||
cases come directly from that project.
|
cases come directly from that project.
|
||||||
|
|
||||||
> If you need a Ruby implementation or a [CLI](http://en.wikipedia.org/wiki/Command-line_interface),
|
### Related
|
||||||
> please consider the [mdl](https://rubygems.org/gems/mdl) gem.
|
|
||||||
|
* [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
|
## Demonstration
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -755,16 +755,19 @@ module.exports.readme = function readme(test) {
|
||||||
function readFile(err, contents) {
|
function readFile(err, contents) {
|
||||||
test.ifError(err);
|
test.ifError(err);
|
||||||
var rulesLeft = rules.slice();
|
var rulesLeft = rules.slice();
|
||||||
|
var seenRelated = false;
|
||||||
var seenRules = false;
|
var seenRules = false;
|
||||||
var inRules = false;
|
var inRules = false;
|
||||||
var seenTags = false;
|
var seenTags = false;
|
||||||
var inTags = false;
|
var 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") {
|
||||||
if (!seenRules) {
|
if (!seenRelated) {
|
||||||
|
seenRelated = true;
|
||||||
|
} else if (seenRelated && !seenRules) {
|
||||||
seenRules = true;
|
seenRules = true;
|
||||||
inRules = true;
|
inRules = true;
|
||||||
} else if (!seenTags) {
|
} else if (seenRelated && seenRules && !seenTags) {
|
||||||
seenTags = true;
|
seenTags = true;
|
||||||
inTags = true;
|
inTags = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue