File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
ide/src/syntax_highlighting Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ const RUSTDOC_FENCE_TOKENS: &[&'static str] = &[
85
85
"ignore" ,
86
86
"no_run" ,
87
87
"compile_fail" ,
88
+ "allow_fail" ,
89
+ "test_harness" ,
88
90
"edition2015" ,
89
91
"edition2018" ,
90
92
"edition2021" ,
@@ -181,7 +183,7 @@ pub(super) fn doc_comment(
181
183
is_codeblock = !is_codeblock;
182
184
// Check whether code is rust by inspecting fence guards
183
185
let guards = & line[ idx + RUSTDOC_FENCE . len ( ) ..] ;
184
- let is_rust = guards. split ( ',' ) . all ( |sub| is_rustdoc_fence_token ( sub. trim ( ) ) ) ;
186
+ let is_rust = guards. split ( ',' ) . any ( |sub| is_rustdoc_fence_token ( sub. trim ( ) ) ) ;
185
187
is_doctest = is_codeblock && is_rust;
186
188
continue ;
187
189
}
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ const RUSTDOC_CODE_BLOCK_ATTRIBUTES_RUST_SPECIFIC: &[&str] = &[
8
8
"ignore" ,
9
9
"no_run" ,
10
10
"compile_fail" ,
11
+ "allow_fail" ,
12
+ "test_harness" ,
11
13
"edition2015" ,
12
14
"edition2018" ,
13
15
"edition2021" ,
@@ -28,7 +30,7 @@ pub(crate) fn format_docs(src: &str) -> String {
28
30
29
31
if in_code_block {
30
32
is_rust =
31
- header. split ( ',' ) . all ( |sub| is_rust_specific_code_block_attribute ( sub. trim ( ) ) ) ;
33
+ header. split ( ',' ) . any ( |sub| is_rust_specific_code_block_attribute ( sub. trim ( ) ) ) ;
32
34
33
35
if is_rust {
34
36
line = "```rust" ;
You can’t perform that action at this time.
0 commit comments