Skip to content

Commit

Permalink
Merge pull request #13 from szepeviktor/patch-1
Browse files Browse the repository at this point in the history
improve ToC handling
  • Loading branch information
adamlaki authored Mar 3, 2024
2 parents 9e33cd6 + bdc1832 commit 69276bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ module.exports = config => {
elements.forEach(element => {
const heading = element.querySelector('h2, h3');

if (heading && heading.textContent !== 'Example(s)' && heading.textContent !== 'Argument(s)' && heading.textContent !== 'References') {
if (heading && ! ['Example(s)', 'Argument(s)', 'References'].includes(heading.textContent)) {
toc += `<li class="toc-level-${heading.tagName.toLowerCase()}"><a href="#${heading.id}">${heading.textContent}</a></li>`;
}
});
Expand Down

0 comments on commit 69276bb

Please sign in to comment.