Skip to content

Commit 3869b7b

Browse files
committed
Auto merge of #111824 - lukas-code:strike, r=notriddle
rustdoc: include strikethrough in item summary Fixes #111822. Since **bold** and *italic* are included, I don't see why ~~strikethrough~~ shouldn't be.
2 parents 2440cca + f4ce045 commit 3869b7b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/librustdoc/html/markdown.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,15 @@ impl<'a, I: Iterator<Item = Event<'a>>> SummaryLine<'a, I> {
551551
}
552552

553553
fn check_if_allowed_tag(t: &Tag<'_>) -> bool {
554-
matches!(t, Tag::Paragraph | Tag::Emphasis | Tag::Strong | Tag::Link(..) | Tag::BlockQuote)
554+
matches!(
555+
t,
556+
Tag::Paragraph
557+
| Tag::Emphasis
558+
| Tag::Strong
559+
| Tag::Strikethrough
560+
| Tag::Link(..)
561+
| Tag::BlockQuote
562+
)
555563
}
556564

557565
fn is_forbidden_tag(t: &Tag<'_>) -> bool {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#![crate_name = "foo"]
2+
3+
// @has foo/index.html '//del' 'strike'
4+
5+
/// ~~strike~~
6+
pub fn strike() {}

0 commit comments

Comments
 (0)