Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 814f56d

Browse files
Trottaduh95
andauthoredMar 20, 2021
Update tools/doc/html.js
Co-authored-by: Antoine du Hamel <[email protected]>
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

+3
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)
Please sign in to comment.