Skip to content

Commit

Permalink
rustbook chapters/sections should be an ordered list.
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv authored Aug 30, 2016
1 parent 77d2cd2 commit 10b8e0e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tools/rustbook/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ fn write_toc(book: &Book, current_page: &BookItem, out: &mut Write) -> io::Resul
section,
item.title)?;
if !item.children.is_empty() {
writeln!(out, "<ul class='section'>")?;
writeln!(out, "<ol class='section'>")?;
let _ = walk_items(&item.children[..], section, current_page, out);
writeln!(out, "</ul>")?;
writeln!(out, "</ol>")?;
}
writeln!(out, "</li>")?;

Ok(())
}

writeln!(out, "<div id='toc' class='mobile-hidden'>")?;
writeln!(out, "<ul class='chapter'>")?;
writeln!(out, "<ol class='chapter'>")?;
walk_items(&book.chapters[..], "", &current_page, out)?;
writeln!(out, "</ul>")?;
writeln!(out, "</ol>")?;
writeln!(out, "</div>")?;

Ok(())
Expand Down

0 comments on commit 10b8e0e

Please sign in to comment.