Skip to content

Commit 10b8e0e

Browse files
authored
rustbook chapters/sections should be an ordered list.
1 parent 77d2cd2 commit 10b8e0e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/tools/rustbook/build.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,19 @@ fn write_toc(book: &Book, current_page: &BookItem, out: &mut Write) -> io::Resul
6161
section,
6262
item.title)?;
6363
if !item.children.is_empty() {
64-
writeln!(out, "<ul class='section'>")?;
64+
writeln!(out, "<ol class='section'>")?;
6565
let _ = walk_items(&item.children[..], section, current_page, out);
66-
writeln!(out, "</ul>")?;
66+
writeln!(out, "</ol>")?;
6767
}
6868
writeln!(out, "</li>")?;
6969

7070
Ok(())
7171
}
7272

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

7979
Ok(())

0 commit comments

Comments
 (0)