From c12cbf2020e207d74f296009b0f9e340d1861c97 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 22 Dec 2021 17:32:10 -0800 Subject: [PATCH] tools: avoid generating duplicate id attributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In all.html, we currently generate hundreds of duplicate id attributes because of conflicts between the way allhtml.mjs prefixes in-page links with the module name on the one hand, and the existence of legacy id attributes hardcoded into the page on the other hand. This prefaces the module name with `all_` to avoid the conflicts. PR-URL: https://github.com/nodejs/node/pull/41291 Reviewed-By: Antoine du Hamel Reviewed-By: Tobias Nießen Reviewed-By: James M Snell --- tools/doc/allhtml.mjs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/doc/allhtml.mjs b/tools/doc/allhtml.mjs index c9f63d6d26f091..13fda2c573f668 100644 --- a/tools/doc/allhtml.mjs +++ b/tools/doc/allhtml.mjs @@ -38,7 +38,7 @@ for (const link of toc.match(//g)) { .replace(/[\s\S]*?id="toc"[^>]*>\s*<\w+>.*?<\/\w+>\s*(