Fix #34
This commit is contained in:
parent
fd57d03992
commit
05ab31d882
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue