From 11b1ff190017740308e9f17422a8b42e2223e75a Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 7 Apr 2015 15:22:57 -0700 Subject: [PATCH] book: Fix a hyperlink to CONFIGS.md Right now rustdoc replaces the string ".md)" with ".html)" to fix links between markdown files, so use a different syntax that doesn't get caught in the crossfire. Closes #22900 --- src/doc/trpl/hello-world.md | 4 +++- src/rustbook/build.rs | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/doc/trpl/hello-world.md b/src/doc/trpl/hello-world.md index f726f8627c92..b077d3d5ce68 100644 --- a/src/doc/trpl/hello-world.md +++ b/src/doc/trpl/hello-world.md @@ -89,7 +89,9 @@ This line does all of the work in our little program. There are a number of details that are important here. The first is that it's indented with four spaces, not tabs. Please configure your editor of choice to insert four spaces with the tab key. We provide some [sample configurations for various -editors](https://github.com/rust-lang/rust/tree/master/src/etc/CONFIGS.md). +editors][configs]. + +[configs]: https://github.com/rust-lang/rust/tree/master/src/etc/CONFIGS.md The second point is the `println!()` part. This is calling a Rust *macro*, which is how metaprogramming is done in Rust. If it were a function instead, it diff --git a/src/rustbook/build.rs b/src/rustbook/build.rs index 62926c28d710..f96704ee1283 100644 --- a/src/rustbook/build.rs +++ b/src/rustbook/build.rs @@ -89,7 +89,8 @@ fn render(book: &Book, tgt: &Path) -> CliResult<()> { } else { src = PathBuf::from(&env::args().nth(2).unwrap()); } - // preprocess the markdown, rerouting markdown references to html references + // preprocess the markdown, rerouting markdown references to html + // references let mut markdown_data = String::new(); try!(File::open(&src.join(&item.path)).and_then(|mut f| { f.read_to_string(&mut markdown_data)