File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 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.
631631``` rust
632632#![feature(custom_code_classes_in_docs)]
633633
634- /// ```{class=language-c}
634+ /// ```custom, {class=language-c}
635635/// int main(void) { return 0; }
636636/// ```
637637pub struct Bar ;
@@ -641,12 +641,16 @@ The text `int main(void) { return 0; }` is rendered without highlighting in a co
641641with the class ` language-c ` . This can be used to highlight other languages through JavaScript
642642libraries for example.
643643
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+
644648To be noted that you can replace ` class= ` with ` . ` to achieve the same result:
645649
646650``` rust
647651#![feature(custom_code_classes_in_docs)]
648652
649- /// ```{.language-c}
653+ /// ```custom, {.language-c}
650654/// int main(void) { return 0; }
651655/// ```
652656pub struct Bar ;
You can’t perform that action at this time.
0 commit comments