Skip to content

Commit

Permalink
Link grammar elements in the grammar index to one another
Browse files Browse the repository at this point in the history
  • Loading branch information
tobie committed Oct 11, 2017
1 parent 66aa28a commit 3425f3d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -13642,10 +13642,11 @@ The following conformance classes are defined by this specification:

pre.innerHTML = html;
var fillWith = document.querySelectorAll("div[data-fill-with=\"grammar-" + pre.id.replace("prod-", "") + "\"]");
[].forEach.call(fillWith, div => div.innerHTML = wrap(html))
[].forEach.call(fillWith, div => div.innerHTML = wrap(html));

if (!(/\bno-index\b/).test(pre.className)) {
output += html + "\n";
output += html.replace(/<emu-nt>/, "<emu-nt id=\"" + pre.id.replace("prod-", "index-prod-") + "\">")
.replace(/#prod-([^a-z])/g, "#index-prod-$1") + "\n";
}
});
document.querySelector("div[data-fill-with=\"grammar-index\"]").innerHTML = wrap(output);
Expand Down

0 comments on commit 3425f3d

Please sign in to comment.