From 9a9fadac774ef678959848c821dfd133100e13b3 Mon Sep 17 00:00:00 2001 From: Mathieu David Date: Wed, 29 Jul 2015 01:06:46 +0200 Subject: [PATCH] Forgot to update level variable, fixed now. --- src/renderer/html_handlebars.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/renderer/html_handlebars.rs b/src/renderer/html_handlebars.rs index f78642f5..40cb92eb 100644 --- a/src/renderer/html_handlebars.rs +++ b/src/renderer/html_handlebars.rs @@ -3,7 +3,7 @@ extern crate rustc_serialize; extern crate pulldown_cmark; use renderer::Renderer; -use book::{BookItems, BookItem, BookConfig}; +use book::{BookItems, BookConfig}; use theme; use std::path::{Path, PathBuf, Component}; @@ -13,8 +13,7 @@ use std::io::{self, Read, Write}; use std::collections::BTreeMap; use self::handlebars::{Handlebars, HelperDef, RenderError, RenderContext, Helper, Context, JsonRender}; -use self::rustc_serialize::json::{Json, ToJson}; -use self::rustc_serialize::{json, Decodable, Decoder}; +use self::rustc_serialize::json::{self, Json, ToJson}; use self::pulldown_cmark::Parser; use self::pulldown_cmark::html; @@ -239,6 +238,8 @@ impl HelperDef for RenderToc { try!(rc.writer.write("".as_bytes())); try!(rc.writer.write("".as_bytes())); + + current_level = level; } try!(rc.writer.write("".as_bytes()));