diff --git a/README.md b/README.md index 264110f..dff4f27 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ will be converted to: Paragraph text. -```rust +```rust,ignore some_code(); ``` ```` diff --git a/packages/mdbook-rust/src/lib.rs b/packages/mdbook-rust/src/lib.rs index 1271fed..e9a99d7 100644 --- a/packages/mdbook-rust/src/lib.rs +++ b/packages/mdbook-rust/src/lib.rs @@ -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; diff --git a/packages/mdbook-rust/tests/integration.rs b/packages/mdbook-rust/tests/integration.rs index 03e2705..ea464ed 100644 --- a/packages/mdbook-rust/tests/integration.rs +++ b/packages/mdbook-rust/tests/integration.rs @@ -35,7 +35,7 @@ fn basic() { Body text - ```rust + ```rust,ignore let x = 1; ``` "}, @@ -107,7 +107,7 @@ fn code_only() { indoc! {" - ```rust + ```rust,ignore let x = 1; let y = 1; ``` @@ -128,7 +128,7 @@ fn code_spacing() { indoc! {" - ```rust + ```rust,ignore let x = 1; let y = 1;