Skip to content

Commit cb0a992

Browse files
authored
Merge pull request #2364 from expikr/patch-3
Fix dividers being folded by sections
2 parents a555c6b + c2eb375 commit cb0a992

File tree

1 file changed

+6
-6
lines changed
  • src/renderer/html_handlebars/helpers

1 file changed

+6
-6
lines changed

src/renderer/html_handlebars/helpers/toc.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ impl HelperDef for RenderToc {
7474
let mut is_first_chapter = ctx.data().get("is_index").is_some();
7575

7676
for item in chapters {
77-
// Spacer
78-
if item.contains_key("spacer") {
79-
out.write("<li class=\"spacer\"></li>")?;
80-
continue;
81-
}
82-
8377
let (section, level) = if let Some(s) = item.get("section") {
8478
(s.as_str(), s.matches('.').count())
8579
} else {
@@ -118,6 +112,12 @@ impl HelperDef for RenderToc {
118112
}
119113
}
120114

115+
// Spacer
116+
if item.contains_key("spacer") {
117+
out.write("<li class=\"spacer\"></li>")?;
118+
continue;
119+
}
120+
121121
// Part title
122122
if let Some(title) = item.get("part") {
123123
out.write("<li class=\"part-title\">")?;

0 commit comments

Comments
 (0)