From f39d7b7db7a92555f3b89f0be11e74d57fd33587 Mon Sep 17 00:00:00 2001 From: foxxyz Date: Tue, 13 Jul 2021 19:30:06 -0700 Subject: [PATCH] doc: throw if id/href in marks do not match --- tools/doc/allhtml.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/doc/allhtml.mjs b/tools/doc/allhtml.mjs index db1e724c0aa2f9..f37dfdd93c1a39 100644 --- a/tools/doc/allhtml.mjs +++ b/tools/doc/allhtml.mjs @@ -44,7 +44,8 @@ for (const link of toc.match(//g)) { apicontent += '
' + data.slice(match.index + match[0].length) .replace(/[\s\S]*/, '
') // Prefix all in-page anchor marks with module name - .replace(/ { + .replace(/ { + if (anchor !== id) throw new Error(`Mark does not match: ${anchor} should match ${id}`); return `