Skip to content

Commit

Permalink
ensure discrete headings are not included in page TOC
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitriy Razmakhov authored and mojavelinux committed Feb 7, 2024
1 parent 71c6ea8 commit 245beea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions preview-src/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ Eu mea inani iriure.
[discrete]
== Voluptua singulis

[discrete]
=== Nominavi luptatum

Cum dicat putant ne.
Est in reque homero principes, meis deleniti mediocrem ad has.
Ex nam suas nemore dignissim, vel apeirian democritum et.
Expand Down
2 changes: 1 addition & 1 deletion src/js/02-on-this-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
var headingSelector = [articleSelector]
if (level) {
for (var l = 1; l <= level; l++) headingSelector.push((l === 2 ? '.sectionbody>' : '') + '.sect' + l)
headingSelector.push('h' + (level + 1) + '[id]')
headingSelector.push('h' + (level + 1) + '[id]' + (level > 1 ? ':not(.discrete)' : ''))
} else {
headingSelector.push('h1[id].sect0')
}
Expand Down

0 comments on commit 245beea

Please sign in to comment.