mirror of
https://github.com/rust-lang-nursery/rust-cookbook
synced 2024-11-26 05:20:23 +00:00
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.
This commit is contained in:
parent
c1577a5f74
commit
e36d826777
7 changed files with 12 additions and 24 deletions
|
@ -68,7 +68,7 @@
|
|||
|
||||
<div id="content" class="content">
|
||||
<a class="header" href="#json" name="json"><h1>JSON</h1></a>
|
||||
<p>[![byteorder-badge]][byteorder]</p>
|
||||
<p><a href="http://json.rs/doc/json"><img src="https://img.shields.io/crates/v/rustc-serialize.svg?label=json" alt="json-badge" /></a></p>
|
||||
<a class="header" href="#json-implementation-in-rust" name="json-implementation-in-rust"><h2>JSON implementation in Rust:</h2></a>
|
||||
<p>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(){
|
|||
<a class="header" href="#license" name="license"><h1>License</h1></a>
|
||||
<p>MIT/Apache-2.0</p>
|
||||
<!-- Links -->
|
||||
[byteorder-badge]: https://img.shields.io/crates/v/rustc-serialize.svg?label=json
|
||||
[byteorder]: http://json.rs/doc/json
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ MathJax.Hub.Queue(function() {
|
|||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<a class="header" href="#rand" name="rand"><h1>rand</h1></a>
|
||||
<a class="header" href="#random-number-generators-and-other-randomness-functionality" name="random-number-generators-and-other-randomness-functionality"><h2>Random number generators and other randomness functionality</h2></a>
|
||||
<p>[![rand-badge]][rand]</p>
|
||||
<p><a href="https://doc.rust-lang.org/rand/rand/index.html"><img src="https://img.shields.io/crates/v/rand.svg?label=rand" alt="rand-badge" /></a></p>
|
||||
<a class="header" href="#example-monte-carlo-integration" name="example-monte-carlo-integration"><h3>Example: Monte carlo integration</h3></a>
|
||||
<p>Use the <code>rand</code> crate to generate random samples and approximate
|
||||
$\int_{0}^{\pi} sin(x) dx$ using monte carlo method.</p>
|
||||
|
@ -128,8 +128,6 @@ fn main() {
|
|||
}
|
||||
</code></pre>
|
||||
<!-- Links -->
|
||||
[rand-badge]: https://img.shields.io/crates/v/rand.svg?label=rand
|
||||
[rand]: https://doc.rust-lang.org/rand/rand/index.html
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
|
||||
<div id="content" class="content">
|
||||
<a class="header" href="#toml" name="toml"><h1>TOML</h1></a>
|
||||
<p>[![toml-badge]][toml]</p>
|
||||
<p><a href="http://alexcrichton.com/toml-rs/toml/"><img src="https://img.shields.io/crates/v/rustc-serialize.svg?label=toml" alt="toml-badge" /></a></p>
|
||||
<p>Parse TOML into a <code>toml::Value</code> and then operate on it:</p>
|
||||
<pre><code class="language-rust">extern crate toml;
|
||||
|
||||
|
@ -134,8 +134,6 @@ fn main() {
|
|||
<a class="header" href="#license" name="license"><h1>License</h1></a>
|
||||
<p>MIT/Apache-2.0</p>
|
||||
<!-- Links -->
|
||||
[toml-badge]: https://img.shields.io/crates/v/rustc-serialize.svg?label=toml
|
||||
[toml]: http://alexcrichton.com/toml-rs/toml/
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ MathJax.Hub.Queue(function() {
|
|||
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
||||
<a class="header" href="#rand" name="rand"><h1>rand</h1></a>
|
||||
<a class="header" href="#random-number-generators-and-other-randomness-functionality" name="random-number-generators-and-other-randomness-functionality"><h2>Random number generators and other randomness functionality</h2></a>
|
||||
<p>[![rand-badge]][rand]</p>
|
||||
<p><a href="https://doc.rust-lang.org/rand/rand/index.html"><img src="https://img.shields.io/crates/v/rand.svg?label=rand" alt="rand-badge" /></a></p>
|
||||
<a class="header" href="#example-monte-carlo-integration" name="example-monte-carlo-integration"><h3>Example: Monte carlo integration</h3></a>
|
||||
<p>Use the <code>rand</code> crate to generate random samples and approximate
|
||||
$\int_{0}^{\pi} sin(x) dx$ using monte carlo method.</p>
|
||||
|
@ -182,8 +182,6 @@ fn main() {
|
|||
}
|
||||
</code></pre>
|
||||
<!-- Links -->
|
||||
[rand-badge]: https://img.shields.io/crates/v/rand.svg?label=rand
|
||||
[rand]: https://doc.rust-lang.org/rand/rand/index.html
|
||||
<a class="header" href="#byteorder" name="byteorder"><h1>Byteorder</h1></a>
|
||||
<p><a href="https://docs.rs/byteorder"><img src="https://img.shields.io/crates/v/rustc-serialize.svg?label=byteorder" alt="byteorder-badge" /></a></p>
|
||||
<a class="header" href="#read-and-write-integers-in-little-endian-byte-order" name="read-and-write-integers-in-little-endian-byte-order"><h2>Read and write integers in little-endian byte order</h2></a>
|
||||
|
@ -235,7 +233,7 @@ fn main() { run().unwrap() }
|
|||
</code></pre>
|
||||
<!-- Links -->
|
||||
<a class="header" href="#json" name="json"><h1>JSON</h1></a>
|
||||
<p>[![byteorder-badge]][byteorder]</p>
|
||||
<p><a href="http://json.rs/doc/json"><img src="https://img.shields.io/crates/v/rustc-serialize.svg?label=json" alt="json-badge" /></a></p>
|
||||
<a class="header" href="#json-implementation-in-rust" name="json-implementation-in-rust"><h2>JSON implementation in Rust:</h2></a>
|
||||
<p>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(){
|
|||
<a class="header" href="#license" name="license"><h1>License</h1></a>
|
||||
<p>MIT/Apache-2.0</p>
|
||||
<!-- Links -->
|
||||
[byteorder-badge]: https://img.shields.io/crates/v/rustc-serialize.svg?label=json
|
||||
[byteorder]: http://json.rs/doc/json
|
||||
<a class="header" href="#toml" name="toml"><h1>TOML</h1></a>
|
||||
<p>[![toml-badge]][toml]</p>
|
||||
<p><a href="http://alexcrichton.com/toml-rs/toml/"><img src="https://img.shields.io/crates/v/rustc-serialize.svg?label=toml" alt="toml-badge" /></a></p>
|
||||
<p>Parse TOML into a <code>toml::Value</code> and then operate on it:</p>
|
||||
<pre><code class="language-rust">extern crate toml;
|
||||
|
||||
|
@ -342,8 +338,6 @@ fn main() {
|
|||
<a class="header" href="#license" name="license"><h1>License</h1></a>
|
||||
<p>MIT/Apache-2.0</p>
|
||||
<!-- Links -->
|
||||
[toml-badge]: https://img.shields.io/crates/v/rustc-serialize.svg?label=toml
|
||||
[toml]: http://alexcrichton.com/toml-rs/toml/
|
||||
<a class="header" href="#contributing-to-the-rust-cookbook" name="contributing-to-the-rust-cookbook"><h1>Contributing to the Rust Cookbook</h1></a>
|
||||
<p>Have something useful to add to the Rust Cookbook? We'd love to have it!</p>
|
||||
<p>This document contains information and guidelines that you should read before
|
||||
|
|
|
@ -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
|
||||
|
||||
<!-- Links -->
|
||||
[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
|
||||
|
|
|
@ -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() {
|
|||
```
|
||||
|
||||
<!-- Links -->
|
||||
|
||||
[rand-badge]: https://img.shields.io/crates/v/rand.svg?label=rand
|
||||
[rand]: https://doc.rust-lang.org/rand/rand/index.html
|
||||
|
|
|
@ -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
|
||||
|
||||
<!-- Links -->
|
||||
|
||||
[toml-badge]: https://img.shields.io/crates/v/rustc-serialize.svg?label=toml
|
||||
[toml]: http://alexcrichton.com/toml-rs/toml/
|
||||
|
|
Loading…
Reference in a new issue