We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e562fd commit 5e71d63Copy full SHA for 5e71d63
tools/doc/allhtml.js
@@ -73,3 +73,16 @@ all = all.slice(0, apiStart.index + apiStart[0].length) +
73
74
// Write results.
75
fs.writeFileSync(source + '/all.html', all, 'utf8');
76
+
77
+// Validate all hrefs have a target.
78
+const ids = new Set();
79
+const idRe = / id="(\w+)"/g;
80
+let match;
81
+while (match = idRe.exec(all)) {
82
+ ids.add(match[1]);
83
+}
84
85
+const hrefRe = / href="#(\w+)"/g;
86
+while (match = hrefRe.exec(all)) {
87
+ if (!ids.has(match[1])) throw new Error(`link not found: ${match[1]}`);
88
0 commit comments