Skip to content

Commit

Permalink
Update tools/doc/html.js
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
Trott and aduh95 committed Mar 20, 2021
1 parent 706730f commit 814f56d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/doc/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ function processContent(content) {
if (content.includes('<h6>')) {
throw new Error('Cannot increment a level 6 header');
}
if (/<h[1-5][^>]/.test(content) {
throw new Error('Cannot parse header tag with attributes');
}
content.replace(/(?<=<\/?h)[1-5](?=>)/g, (level) => level + 1);
// Wrap h3 tags in section tags.
let firstTime = true;
Expand Down

0 comments on commit 814f56d

Please sign in to comment.