From 1c22c1ca53b148d12adaa32b9ab885e0aba0dac1 Mon Sep 17 00:00:00 2001 From: foxxyz Date: Tue, 20 Jul 2021 19:12:38 -0700 Subject: [PATCH] doc: use stricter module name parsing Co-authored-by: Antoine du Hamel --- tools/doc/allhtml.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/doc/allhtml.mjs b/tools/doc/allhtml.mjs index f69d4bbf3ae468..dd95d264139c47 100644 --- a/tools/doc/allhtml.mjs +++ b/tools/doc/allhtml.mjs @@ -32,7 +32,7 @@ for (const link of toc.match(//g)) { const match = /(<\/ul>\s*)?<\/\w+>\s*<\w+ id="apicontent">/.exec(data); // Get module name - const moduleName = href.split('.')[0]; + const moduleName = href.replace(/\.html$/, ''); contents += data.slice(0, match.index) .replace(/[\s\S]*?id="toc"[^>]*>\s*<\w+>.*?<\/\w+>\s*(
    \s*)?/, '')