Skip to content

Commit

Permalink
Add ,ignore to rust snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-bourne committed Dec 1, 2023
1 parent 8b18e1e commit c5a4423
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ will be converted to:

Paragraph text.

```rust
```rust,ignore
some_code();
```
````
Expand Down
2 changes: 1 addition & 1 deletion packages/mdbook-rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ fn ensure_in_code_block<'a>(in_code_block: &mut bool, whitespace: &'a str) -> &'
let text = if *in_code_block {
whitespace
} else {
"\n\n```rust\n"
"\n\n```rust,ignore\n"
};

*in_code_block = true;
Expand Down
6 changes: 3 additions & 3 deletions packages/mdbook-rust/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn basic() {
Body text
```rust
```rust,ignore
let x = 1;
```
"},
Expand Down Expand Up @@ -107,7 +107,7 @@ fn code_only() {
indoc! {"
```rust
```rust,ignore
let x = 1;
let y = 1;
```
Expand All @@ -128,7 +128,7 @@ fn code_spacing() {
indoc! {"
```rust
```rust,ignore
let x = 1;
let y = 1;
Expand Down

0 comments on commit c5a4423

Please sign in to comment.