summaryrefslogtreecommitdiffstats
path: root/src/librustdoc/markdown.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustdoc/markdown.rs')
-rw-r--r--src/librustdoc/markdown.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/librustdoc/markdown.rs b/src/librustdoc/markdown.rs
index 526eea304..b74a9392f 100644
--- a/src/librustdoc/markdown.rs
+++ b/src/librustdoc/markdown.rs
@@ -80,6 +80,8 @@ pub(crate) fn render<P: AsRef<Path>>(
error_codes,
edition,
playground: &playground,
+ // For markdown files, it'll be disabled until the feature is enabled by default.
+ custom_code_classes_in_docs: false,
}
.into_string()
} else {
@@ -91,6 +93,8 @@ pub(crate) fn render<P: AsRef<Path>>(
edition,
playground: &playground,
heading_offset: HeadingOffset::H1,
+ // For markdown files, it'll be disabled until the feature is enabled by default.
+ custom_code_classes_in_docs: false,
}
.into_string()
};
@@ -154,7 +158,15 @@ pub(crate) fn test(options: Options) -> Result<(), String> {
collector.set_position(DUMMY_SP);
let codes = ErrorCodes::from(options.unstable_features.is_nightly_build());
- find_testable_code(&input_str, &mut collector, codes, options.enable_per_target_ignores, None);
+ // For markdown files, custom code classes will be disabled until the feature is enabled by default.
+ find_testable_code(
+ &input_str,
+ &mut collector,
+ codes,
+ options.enable_per_target_ignores,
+ None,
+ false,
+ );
crate::doctest::run_tests(options.test_args, options.nocapture, collector.tests);
Ok(())