Skip to content

Commit 245beea

Browse files
Dmitriy Razmakhovmojavelinux
authored andcommitted
ensure discrete headings are not included in page TOC
1 parent 71c6ea8 commit 245beea

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

preview-src/index.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ Eu mea inani iriure.
285285
[discrete]
286286
== Voluptua singulis
287287

288+
[discrete]
289+
=== Nominavi luptatum
290+
288291
Cum dicat putant ne.
289292
Est in reque homero principes, meis deleniti mediocrem ad has.
290293
Ex nam suas nemore dignissim, vel apeirian democritum et.

src/js/02-on-this-page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
var headingSelector = [articleSelector]
1515
if (level) {
1616
for (var l = 1; l <= level; l++) headingSelector.push((l === 2 ? '.sectionbody>' : '') + '.sect' + l)
17-
headingSelector.push('h' + (level + 1) + '[id]')
17+
headingSelector.push('h' + (level + 1) + '[id]' + (level > 1 ? ':not(.discrete)' : ''))
1818
} else {
1919
headingSelector.push('h1[id].sect0')
2020
}

0 commit comments

Comments
 (0)