Skip to content

Commit

Permalink
Don't rely on toc-end comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfhandl committed Aug 20, 2024
1 parent 5a1b241 commit 3c2c9c6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/md2html/md2html.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ for (let l in lines) {

// remove TOC from older spec versions, respec will generate a new one
if (line.startsWith('## Table of Contents')) inTOC = true;
if (line.startsWith('<!-- /TOC')) inTOC = false;
else if (line.startsWith('#')) inTOC = false;
if (inTOC) line = '';

// special formatting for Definitions section
Expand Down
1 change: 0 additions & 1 deletion tests/md2html/fixtures/basic-old.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<p>Text for first chapter</p>
<section class="override" id="conformance"><h2>Version 30.0.1</h2>
<p>This is the conformance section</p>
<!-- /TOC -->
</section></section><section><h1>Heading 2</h1>
<p>Text for first section</p>
<p><span id="parameterAllowEmptyValue"></span>Broken anchor</p>
Expand Down
2 changes: 0 additions & 2 deletions tests/md2html/fixtures/basic-old.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ This is the conformance section

Will be removed

<!-- /TOC -->

## Heading 2

Text for first section
Expand Down

0 comments on commit 3c2c9c6

Please sign in to comment.