Skip to content

Commit 2cc7b7c

Browse files
committed
Enable all main body Markdown options for summaries
This fixes odd renderings when these features are used in the first paragraph of documentation for an item. This is an extension of rust-lang#87270.
1 parent 208a5fd commit 2cc7b7c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/librustdoc/html/markdown.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@ pub(crate) fn main_body_opts() -> Options {
5656
| Options::ENABLE_SMART_PUNCTUATION
5757
}
5858

59-
/// A subset of [`main_body_opts()`] used for rendering summaries.
59+
/// Options for rendering Markdown in summaries (e.g., in search results).
6060
pub(crate) fn summary_opts() -> Options {
61-
Options::ENABLE_STRIKETHROUGH | Options::ENABLE_SMART_PUNCTUATION | Options::ENABLE_TABLES
61+
Options::ENABLE_TABLES
62+
| Options::ENABLE_FOOTNOTES
63+
| Options::ENABLE_STRIKETHROUGH
64+
| Options::ENABLE_TASKLISTS
65+
| Options::ENABLE_SMART_PUNCTUATION
6266
}
6367

6468
/// When `to_string` is called, this struct will emit the HTML corresponding to

0 commit comments

Comments
 (0)