We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa84353 commit ec337b2Copy full SHA for ec337b2
tools/doc/allhtml.mjs
@@ -101,12 +101,8 @@ all = all.slice(0, apiStart.index + apiStart[0].length) +
101
fs.writeFileSync(new URL('./all.html', source), all, 'utf8');
102
103
// Validate all hrefs have a target.
104
-const ids = new Set();
105
const idRe = / id="([^"]+)"/g;
106
-const idMatches = all.matchAll(idRe);
107
-for (const match of idMatches) {
108
- ids.add(match[1]);
109
-}
+const ids = new Set([...all.matchAll(idRe)].map((match) => match[1]));
110
111
const hrefRe = / href="#([^"]+)"/g;
112
const hrefMatches = all.matchAll(hrefRe);
0 commit comments