summaryrefslogtreecommitdiffstats
path: root/src/librustdoc/markdown.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /src/librustdoc/markdown.rs
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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(())