Add short links to each rule in Rules.md, update README.md to use them (fixes #54).

This commit is contained in:
David Anson 2017-05-07 12:48:04 -07:00
parent da529ac286
commit b436640918
5 changed files with 133 additions and 43 deletions

View file

@ -13,8 +13,9 @@ rules.forEach(function forRule(rule) {
allRuleNames.push(rule.name);
ruleNameToRule[rule.name] = rule;
// The following is useful for updating README.md
// console.log("* **" + rule.name + "** *" +
// rule.aliases.join(", ") + "* - " + rule.desc);
// console.log(
// "* **[" + rule.name + "](doc/Rules.md#" + rule.name.toLowerCase() +
// ")** *" + rule.aliases.join(", ") + "* - " + rule.desc);
rule.tags.forEach(function forTag(tag) {
var tagUpper = tag.toUpperCase();
var ruleNames = idUpperToRuleNames[tagUpper] || [];