From 05ab31d8826f3d921ca229dc4f0f430b81d61c6a Mon Sep 17 00:00:00 2001 From: Mathieu David Date: Thu, 6 Aug 2015 13:58:27 +0200 Subject: [PATCH] Fix #34 --- src/renderer/html_handlebars/helpers/toc.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/renderer/html_handlebars/helpers/toc.rs b/src/renderer/html_handlebars/helpers/toc.rs index 1246f9d3..9d924086 100644 --- a/src/renderer/html_handlebars/helpers/toc.rs +++ b/src/renderer/html_handlebars/helpers/toc.rs @@ -35,7 +35,11 @@ impl HelperDef for RenderToc { try!(rc.writer.write("".as_bytes())); + while level < current_level { + try!(rc.writer.write("".as_bytes())); + try!(rc.writer.write("".as_bytes())); + current_level = current_level - 1; + } try!(rc.writer.write("
  • ".as_bytes())); } else {