diff --git a/src/librustdoc/html/markdown.rs b/src/librustdoc/html/markdown.rs
index c9957e8e39c..09e7ed293d4 100644
--- a/src/librustdoc/html/markdown.rs
+++ b/src/librustdoc/html/markdown.rs
@@ -551,7 +551,15 @@ impl<'a, I: Iterator- >> 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 {
diff --git a/tests/rustdoc/strikethrough-in-summary.rs b/tests/rustdoc/strikethrough-in-summary.rs
new file mode 100644
index 00000000000..cb6cd0e7ba6
--- /dev/null
+++ b/tests/rustdoc/strikethrough-in-summary.rs
@@ -0,0 +1,6 @@
+#![crate_name = "foo"]
+
+// @has foo/index.html '//del' 'strike'
+
+/// ~~strike~~
+pub fn strike() {}