From 683270946c29dc0a64ec3c37b8a14d187cb1ea32 Mon Sep 17 00:00:00 2001 From: expikr <77922942+expikr@users.noreply.github.com> Date: Tue, 16 Apr 2024 08:45:43 -0700 Subject: [PATCH] Update toc.rs --- src/renderer/html_handlebars/helpers/toc.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/renderer/html_handlebars/helpers/toc.rs b/src/renderer/html_handlebars/helpers/toc.rs index a7483bb178..fed013c719 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("
  • ")?;