This commit is contained in:
Mathieu David 2015-08-06 13:58:27 +02:00
parent fd57d03992
commit 05ab31d882

View file

@ -35,7 +35,11 @@ impl HelperDef for RenderToc {
try!(rc.writer.write("<ul class=\"section\">".as_bytes())); try!(rc.writer.write("<ul class=\"section\">".as_bytes()));
try!(rc.writer.write("<li>".as_bytes())); try!(rc.writer.write("<li>".as_bytes()));
} else if level < current_level { } else if level < current_level {
try!(rc.writer.write("</ul>".as_bytes())); while level < current_level {
try!(rc.writer.write("</ul>".as_bytes()));
try!(rc.writer.write("</li>".as_bytes()));
current_level = current_level - 1;
}
try!(rc.writer.write("<li>".as_bytes())); try!(rc.writer.write("<li>".as_bytes()));
} }
else { else {