From 3425f3d9a509f0aa3b459614c2f472c82de6b79d Mon Sep 17 00:00:00 2001 From: Tobie Langel Date: Wed, 11 Oct 2017 09:48:33 +0200 Subject: [PATCH] Link grammar elements in the grammar index to one another --- index.bs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index de0bebf94..936a9ef97 100644 --- a/index.bs +++ b/index.bs @@ -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(//, "") + .replace(/#prod-([^a-z])/g, "#index-prod-$1") + "\n"; } }); document.querySelector("div[data-fill-with=\"grammar-index\"]").innerHTML = wrap(output);