Skip to content

Commit f4ce045

Browse files
author
Lukas Markeffsky
committed
rustdoc: include strikethrough in item summary
1 parent 0634557 commit f4ce045

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/librustdoc/html/markdown.rs

Lines changed: 9 additions & 1 deletion
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 {
Lines changed: 6 additions & 0 deletions
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)