T48a Docs · Frame passes review; an id-less heading fails the build, protocol-relative links stay native
This commit is contained in:
5 files changed
+7
-4
No files matched your search
@@ -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 });
|
||||
|
||||
Reference in new issue
Block a user