diff --git a/src/rustbook/book.rs b/src/rustbook/book.rs index 2d630d8fe8de7..e14c3346cc155 100644 --- a/src/rustbook/book.rs +++ b/src/rustbook/book.rs @@ -102,7 +102,7 @@ pub fn parse_summary(input: &mut Read, src: &Path) -> Result> top_items.push(BookItem { title: "Introduction".to_string(), path: PathBuf::from("README.md"), - path_to_root: PathBuf::from("."), + path_to_root: PathBuf::from(""), children: vec!(), }); diff --git a/src/rustbook/build.rs b/src/rustbook/build.rs index a1f4539443d9b..aca0db4e1adbe 100644 --- a/src/rustbook/build.rs +++ b/src/rustbook/build.rs @@ -52,16 +52,16 @@ fn write_toc(book: &Book, current_page: &BookItem, out: &mut Write) -> io::Resul current_page: &BookItem, out: &mut Write) -> io::Result<()> { let class_string = if item.path == current_page.path { - "class='active'" + "class='active'" } else { - "" + "" }; try!(writeln!(out, "
  • {} {}", - class_string, - current_page.path_to_root.join(&item.path).with_extension("html").display(), - section, - item.title)); + class_string, + current_page.path_to_root.join(&item.path).with_extension("html").display(), + section, + item.title)); if !item.children.is_empty() { try!(writeln!(out, "