Skip to content

Commit 814f56d

Browse files
Trottaduh95
andauthored
Update tools/doc/html.js
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 706730f commit 814f56d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/doc/html.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ function processContent(content) {
7373
if (content.includes('<h6>')) {
7474
throw new Error('Cannot increment a level 6 header');
7575
}
76+
if (/<h[1-5][^>]/.test(content) {
77+
throw new Error('Cannot parse header tag with attributes');
78+
}
7679
content.replace(/(?<=<\/?h)[1-5](?=>)/g, (level) => level + 1);
7780
// Wrap h3 tags in section tags.
7881
let firstTime = true;

0 commit comments

Comments
 (0)