T48a Docs · Frame passes review; an id-less heading fails the build, protocol-relative links stay native

This commit is contained in:
ZacharyZhang-NY committed 2026-10-01 12:08:02 -04:00
1 parent 30dc94f44c
commit 264a9e3232
5 files changed
+7 -4

No files matched your search

+1
View File
@@ -50,6 +50,7 @@ function read(file: string, files: string[]): Guide {
}
const html = this.parser.parseInline(tokens);
const id = slugify(words);
if (!id) throw new Error(`docs: ${file}.md has a heading with no id: ${words}`);
if (ids.has(id)) throw new Error(`docs: ${file}.md repeats heading ${id}`);
ids.add(id);
if (depth === 2) toc.push({ id, text: words });