mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
Rollup merge of #36130 - frewsxcv:patch-32, r=steveklabnik
rustbook chapters/sections should be an ordered list.
This commit is contained in:
commit
668a34d08e
@ -61,9 +61,9 @@ 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>")?;
|
||||
|
||||
@ -71,9 +71,9 @@ fn write_toc(book: &Book, current_page: &BookItem, out: &mut Write) -> io::Resul
|
||||
}
|
||||
|
||||
writeln!(out, "<div id='toc' class='mobile-hidden'>")?;
|
||||
writeln!(out, "<ul class='chapter'>")?;
|
||||
writeln!(out, "<ol class='chapter'>")?;
|
||||
walk_items(&book.chapters[..], "", ¤t_page, out)?;
|
||||
writeln!(out, "</ul>")?;
|
||||
writeln!(out, "</ol>")?;
|
||||
writeln!(out, "</div>")?;
|
||||
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user