From df5472ab5ac52a2645e99a80bf26db1bc0beac90 Mon Sep 17 00:00:00 2001 From: mthh Date: Fri, 7 Apr 2017 12:46:28 +0200 Subject: [PATCH] Should fix sections created with chapter of more than two digits --- src/renderer/html_handlebars/helpers/toc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/html_handlebars/helpers/toc.rs b/src/renderer/html_handlebars/helpers/toc.rs index 3fb7b904..c7cc074a 100644 --- a/src/renderer/html_handlebars/helpers/toc.rs +++ b/src/renderer/html_handlebars/helpers/toc.rs @@ -33,7 +33,7 @@ impl HelperDef for RenderToc { } let level = if let Some(s) = item.get("section") { - s.len() / 2 + s.matches(".").count() } else { 1 };