Skip to content

Commit

Permalink
Merge pull request #2364 from expikr/patch-3
Browse files Browse the repository at this point in the history
Fix dividers being folded by sections
  • Loading branch information
ehuss committed May 14, 2024
2 parents a555c6b + c2eb375 commit cb0a992
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/renderer/html_handlebars/helpers/toc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,6 @@ impl HelperDef for RenderToc {
let mut is_first_chapter = ctx.data().get("is_index").is_some();

for item in chapters {
// Spacer
if item.contains_key("spacer") {
out.write("<li class=\"spacer\"></li>")?;
continue;
}

let (section, level) = if let Some(s) = item.get("section") {
(s.as_str(), s.matches('.').count())
} else {
Expand Down Expand Up @@ -118,6 +112,12 @@ impl HelperDef for RenderToc {
}
}

// Spacer
if item.contains_key("spacer") {
out.write("<li class=\"spacer\"></li>")?;
continue;
}

// Part title
if let Some(title) = item.get("part") {
out.write("<li class=\"part-title\">")?;
Expand Down

0 comments on commit cb0a992

Please sign in to comment.