This commit is contained in:
Mathieu David 2015-08-06 13:58:27 +02:00
parent fd57d03992
commit 05ab31d882
1 changed files with 5 additions and 1 deletions

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 {
while level < current_level {
try!(rc.writer.write("</ul>".as_bytes())); 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 {