Merge pull request #162 from integer32llc/fix-example-book

Fix book-example tests
This commit is contained in:
Mathieu David 2016-08-07 00:06:05 +02:00 committed by GitHub
commit f3f9c93765
3 changed files with 9 additions and 9 deletions

View File

@ -16,6 +16,6 @@ To indicate a block equation
use use
``` ```bash
\\[ \mu = \frac{1}{N} \sum_{i=0} x_i \\] \\[ \mu = \frac{1}{N} \sum_{i=0} x_i \\]
``` ```

View File

@ -5,23 +5,23 @@
There is a feature in mdBook that let's you hide code lines by prepending them with a `#`. There is a feature in mdBook that let's you hide code lines by prepending them with a `#`.
```bash ```bash
#fn main() { # fn main() {
let x = 5; let x = 5;
let y = 6; let y = 6;
println!("{}", x + y); println!("{}", x + y);
#} # }
``` ```
Will render as Will render as
```rust ```rust
#fn main() { # fn main() {
let x = 5; let x = 5;
let y = 7; let y = 7;
println!("{}", x + y); println!("{}", x + y);
#} # }
``` ```

View File

@ -28,23 +28,23 @@ There is a feature in mdBook that let's you hide code lines by prepending them w
```bash ```bash
#fn main() { # fn main() {
let x = 5; let x = 5;
let y = 6; let y = 6;
println!("{}", x + y); println!("{}", x + y);
#} # }
``` ```
Will render as Will render as
```rust ```rust
#fn main() { # fn main() {
let x = 5; let x = 5;
let y = 7; let y = 7;
println!("{}", x + y); println!("{}", x + y);
#} # }
``` ```
**At the moment, this only works for code examples that are annotated with `rust`. Because it would collide with semantics of some programming languages. In the future, we want to make this configurable through the `book.json` so that everyone can benefit from it.** **At the moment, this only works for code examples that are annotated with `rust`. Because it would collide with semantics of some programming languages. In the future, we want to make this configurable through the `book.json` so that everyone can benefit from it.**