Skip to content

Commit f3f9c93

Browse files
authored
Merge pull request #162 from integer32llc/fix-example-book
Fix book-example tests
2 parents 1e6bccd + a0d8013 commit f3f9c93

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

book-example/src/format/mathjax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ To indicate a block equation
1616

1717
use
1818

19-
```
19+
```bash
2020
\\[ \mu = \frac{1}{N} \sum_{i=0} x_i \\]
2121
```

book-example/src/format/rust.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@
55
There is a feature in mdBook that let's you hide code lines by prepending them with a `#`.
66

77
```bash
8-
#fn main() {
8+
# fn main() {
99
let x = 5;
1010
let y = 6;
1111

1212
println!("{}", x + y);
13-
#}
13+
# }
1414
```
1515

1616
Will render as
1717

1818
```rust
19-
#fn main() {
19+
# fn main() {
2020
let x = 5;
2121
let y = 7;
2222

2323
println!("{}", x + y);
24-
#}
24+
# }
2525
```
2626

2727

book-example/src/format/theme/syntax-highlighting.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,23 @@ There is a feature in mdBook that let's you hide code lines by prepending them w
2828

2929

3030
```bash
31-
#fn main() {
31+
# fn main() {
3232
let x = 5;
3333
let y = 6;
3434

3535
println!("{}", x + y);
36-
#}
36+
# }
3737
```
3838

3939
Will render as
4040

4141
```rust
42-
#fn main() {
42+
# fn main() {
4343
let x = 5;
4444
let y = 7;
4545

4646
println!("{}", x + y);
47-
#}
47+
# }
4848
```
4949

5050
**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.**

0 commit comments

Comments
 (0)