Skip to content

Commit

Permalink
Enable all main body Markdown options for summaries
Browse files Browse the repository at this point in the history
This fixes odd renderings when these features are used in the first
paragraph of documentation for an item. This is an extension of #87270.
  • Loading branch information
camelid committed Sep 4, 2021
1 parent 208a5fd commit 2cc7b7c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/librustdoc/html/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,13 @@ pub(crate) fn main_body_opts() -> Options {
| Options::ENABLE_SMART_PUNCTUATION
}

/// A subset of [`main_body_opts()`] used for rendering summaries.
/// Options for rendering Markdown in summaries (e.g., in search results).
pub(crate) fn summary_opts() -> Options {
Options::ENABLE_STRIKETHROUGH | Options::ENABLE_SMART_PUNCTUATION | Options::ENABLE_TABLES
Options::ENABLE_TABLES
| Options::ENABLE_FOOTNOTES
| Options::ENABLE_STRIKETHROUGH
| Options::ENABLE_TASKLISTS
| Options::ENABLE_SMART_PUNCTUATION
}

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

0 comments on commit 2cc7b7c

Please sign in to comment.