mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-13 14:22:35 +00:00
Fix #34
This commit is contained in:
parent
fd57d03992
commit
05ab31d882
1 changed files with 5 additions and 1 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue