Skip to content

Commit

Permalink
Rollup merge of rust-lang#36130 - frewsxcv:patch-32, r=steveklabnik
Browse files Browse the repository at this point in the history
rustbook chapters/sections should be an ordered list.
  • Loading branch information
Jonathan Turner authored Aug 31, 2016
2 parents fc80e7d + 10b8e0e commit 9d2179c
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 9d2179c

Please sign in to comment.