diff --git a/src/renderer/html_handlebars/helpers/toc.rs b/src/renderer/html_handlebars/helpers/toc.rs index a7483bb1..fed013c7 100644 --- a/src/renderer/html_handlebars/helpers/toc.rs +++ b/src/renderer/html_handlebars/helpers/toc.rs @@ -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.get("spacer").is_some() { - out.write("
  • ")?; - continue; - } - let (section, level) = if let Some(s) = item.get("section") { (s.as_str(), s.matches('.').count()) } else { @@ -118,6 +112,12 @@ impl HelperDef for RenderToc { } } + // Spacer + if item.get("spacer").is_some() { + out.write("
  • ")?; + continue; + } + // Part title if let Some(title) = item.get("part") { out.write("
  • ")?;