File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -631,7 +631,7 @@ to jump to a type definition.
631
631
``` rust
632
632
#![feature(custom_code_classes_in_docs)]
633
633
634
- /// ```{class=language-c}
634
+ /// ```custom, {class=language-c}
635
635
/// int main(void) { return 0; }
636
636
/// ```
637
637
pub struct Bar ;
@@ -641,12 +641,16 @@ The text `int main(void) { return 0; }` is rendered without highlighting in a co
641
641
with the class ` language-c ` . This can be used to highlight other languages through JavaScript
642
642
libraries for example.
643
643
644
+ Without the ` custom ` attribute, it would be generated as a Rust code example with an additional
645
+ ` language-C ` CSS class. Therefore, if you specifically don't want it to be a Rust code example,
646
+ don't forget to add the ` custom ` attribute.
647
+
644
648
To be noted that you can replace ` class= ` with ` . ` to achieve the same result:
645
649
646
650
``` rust
647
651
#![feature(custom_code_classes_in_docs)]
648
652
649
- /// ```{.language-c}
653
+ /// ```custom, {.language-c}
650
654
/// int main(void) { return 0; }
651
655
/// ```
652
656
pub struct Bar ;
You can’t perform that action at this time.
0 commit comments