rustdoc: Enable Markdown extensions when looking for doctests

We should enable these to avoid misinterpreting uses of the extended
syntax as code blocks. This happens in practice with multi-paragraph
footnotes, as discovered in #139064.
This commit is contained in:
Noah Lev 2025-04-09 12:51:31 -04:00
parent f06e5c1e35
commit 8b227a42fa
3 changed files with 24 additions and 1 deletions

View file

@ -0,0 +1,18 @@
//@ check-pass
//@ compile-flags:--test
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
// Regression test for #139064.
/// Example
///
/// Footnote with multiple paragraphs[^multiple]
///
/// [^multiple]:
/// One
///
/// Two
///
/// Three
pub fn add(left: u64, right: u64) -> u64 {
left + right
}