mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
Auto merge of #111824 - lukas-code:strike, r=notriddle
rustdoc: include strikethrough in item summary Fixes https://github.com/rust-lang/rust/issues/111822. Since **bold** and *italic* are included, I don't see why ~~strikethrough~~ shouldn't be.
This commit is contained in:
commit
3869b7b12d
@ -551,7 +551,15 @@ impl<'a, I: Iterator<Item = Event<'a>>> SummaryLine<'a, I> {
|
||||
}
|
||||
|
||||
fn check_if_allowed_tag(t: &Tag<'_>) -> bool {
|
||||
matches!(t, Tag::Paragraph | Tag::Emphasis | Tag::Strong | Tag::Link(..) | Tag::BlockQuote)
|
||||
matches!(
|
||||
t,
|
||||
Tag::Paragraph
|
||||
| Tag::Emphasis
|
||||
| Tag::Strong
|
||||
| Tag::Strikethrough
|
||||
| Tag::Link(..)
|
||||
| Tag::BlockQuote
|
||||
)
|
||||
}
|
||||
|
||||
fn is_forbidden_tag(t: &Tag<'_>) -> bool {
|
||||
|
6
tests/rustdoc/strikethrough-in-summary.rs
Normal file
6
tests/rustdoc/strikethrough-in-summary.rs
Normal file
@ -0,0 +1,6 @@
|
||||
#![crate_name = "foo"]
|
||||
|
||||
// @has foo/index.html '//del' 'strike'
|
||||
|
||||
/// ~~strike~~
|
||||
pub fn strike() {}
|
Loading…
Reference in New Issue
Block a user