From e36d826777f5cceb5b494b96a9eac50b448d51f7 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Sat, 25 Feb 2017 15:10:40 -0600 Subject: [PATCH] Fix bug with reference links not being parsed "Links" comment before links are listed at the bottom of each .md file needs to have a space after it or no relative links will be parsed. This is possibly a bug in mdbook's markdown parser. --- book/pages/json.html | 4 +--- book/pages/rand.html | 4 +--- book/pages/toml.html | 4 +--- book/print.html | 12 +++--------- src/pages/json.md | 7 ++++--- src/pages/rand.md | 2 +- src/pages/toml.md | 3 +-- 7 files changed, 12 insertions(+), 24 deletions(-) diff --git a/book/pages/json.html b/book/pages/json.html index 5223307..7b34c22 100644 --- a/book/pages/json.html +++ b/book/pages/json.html @@ -68,7 +68,7 @@

JSON

-

[![byteorder-badge]][byteorder]

+

json-badge

JSON implementation in Rust:

The example below shows two simple ways to embed JSON in Rust. The first method parses block JSON as a block using the parse method from the json crate. It then unwraps the parsed JSON. @@ -106,8 +106,6 @@ fn main(){

License

MIT/Apache-2.0

-[byteorder-badge]: https://img.shields.io/crates/v/rustc-serialize.svg?label=json -[byteorder]: http://json.rs/doc/json
diff --git a/book/pages/rand.html b/book/pages/rand.html index 6b6444a..6e009c4 100644 --- a/book/pages/rand.html +++ b/book/pages/rand.html @@ -87,7 +87,7 @@ MathJax.Hub.Queue(function() {

rand

Random number generators and other randomness functionality

-

[![rand-badge]][rand]

+

rand-badge

Example: Monte carlo integration

Use the rand crate to generate random samples and approximate $\int_{0}^{\pi} sin(x) dx$ using monte carlo method.

@@ -128,8 +128,6 @@ fn main() { } -[rand-badge]: https://img.shields.io/crates/v/rand.svg?label=rand -[rand]: https://doc.rust-lang.org/rand/rand/index.html diff --git a/book/pages/toml.html b/book/pages/toml.html index 783e016..79ad9ac 100644 --- a/book/pages/toml.html +++ b/book/pages/toml.html @@ -68,7 +68,7 @@

TOML

-

[![toml-badge]][toml]

+

toml-badge

Parse TOML into a toml::Value and then operate on it:

extern crate toml;
 
@@ -134,8 +134,6 @@ fn main() {
 

License

MIT/Apache-2.0

-[toml-badge]: https://img.shields.io/crates/v/rustc-serialize.svg?label=toml -[toml]: http://alexcrichton.com/toml-rs/toml/
diff --git a/book/print.html b/book/print.html index 2936ba3..406f65e 100644 --- a/book/print.html +++ b/book/print.html @@ -141,7 +141,7 @@ MathJax.Hub.Queue(function() {

rand

Random number generators and other randomness functionality

-

[![rand-badge]][rand]

+

rand-badge

Example: Monte carlo integration

Use the rand crate to generate random samples and approximate $\int_{0}^{\pi} sin(x) dx$ using monte carlo method.

@@ -182,8 +182,6 @@ fn main() { }
-[rand-badge]: https://img.shields.io/crates/v/rand.svg?label=rand -[rand]: https://doc.rust-lang.org/rand/rand/index.html

Byteorder

byteorder-badge

Read and write integers in little-endian byte order

@@ -235,7 +233,7 @@ fn main() { run().unwrap() }

JSON

-

[![byteorder-badge]][byteorder]

+

json-badge

JSON implementation in Rust:

The example below shows two simple ways to embed JSON in Rust. The first method parses block JSON as a block using the parse method from the json crate. It then unwraps the parsed JSON. @@ -273,10 +271,8 @@ fn main(){

License

MIT/Apache-2.0

-[byteorder-badge]: https://img.shields.io/crates/v/rustc-serialize.svg?label=json -[byteorder]: http://json.rs/doc/json

TOML

-

[![toml-badge]][toml]

+

toml-badge

Parse TOML into a toml::Value and then operate on it:

extern crate toml;
 
@@ -342,8 +338,6 @@ fn main() {
 

License

MIT/Apache-2.0

-[toml-badge]: https://img.shields.io/crates/v/rustc-serialize.svg?label=toml -[toml]: http://alexcrichton.com/toml-rs/toml/

Contributing to the Rust Cookbook

Have something useful to add to the Rust Cookbook? We'd love to have it!

This document contains information and guidelines that you should read before diff --git a/src/pages/json.md b/src/pages/json.md index 4730f15..743d24e 100644 --- a/src/pages/json.md +++ b/src/pages/json.md @@ -1,5 +1,5 @@ # JSON -[![byteorder-badge]][byteorder] +[![json-badge]][json] ## JSON implementation in Rust: @@ -45,5 +45,6 @@ fn main(){ MIT/Apache-2.0 -[byteorder-badge]: https://img.shields.io/crates/v/rustc-serialize.svg?label=json -[byteorder]: http://json.rs/doc/json + +[json-badge]: https://img.shields.io/crates/v/rustc-serialize.svg?label=json +[json]: http://json.rs/doc/json diff --git a/src/pages/rand.md b/src/pages/rand.md index 6f59214..9f111b3 100644 --- a/src/pages/rand.md +++ b/src/pages/rand.md @@ -19,7 +19,6 @@ MathJax.Hub.Queue(function() { # rand ## Random number generators and other randomness functionality - [![rand-badge]][rand] ### Example: Monte carlo integration @@ -64,5 +63,6 @@ fn main() { ``` + [rand-badge]: https://img.shields.io/crates/v/rand.svg?label=rand [rand]: https://doc.rust-lang.org/rand/rand/index.html diff --git a/src/pages/toml.md b/src/pages/toml.md index 67ae997..76bdf54 100644 --- a/src/pages/toml.md +++ b/src/pages/toml.md @@ -1,6 +1,4 @@ - # TOML - [![toml-badge]][toml] Parse TOML into a `toml::Value` and then operate on it: @@ -76,5 +74,6 @@ fn main() { MIT/Apache-2.0 + [toml-badge]: https://img.shields.io/crates/v/rustc-serialize.svg?label=toml [toml]: http://alexcrichton.com/toml-rs/toml/