Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f1d09c9

Browse files
committed
Auto merge of rust-lang#16159 - Waqar144:work/simplify, r=Veykril
minor: use a single push_str instead of 2 push
2 parents 0ed815f + 9f4d269 commit f1d09c9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

crates/ide/src/markdown_remove.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ pub(crate) fn remove_markdown(markdown: &str) -> String {
1313
Event::Text(text) | Event::Code(text) => out.push_str(&text),
1414
Event::SoftBreak => out.push(' '),
1515
Event::HardBreak | Event::Rule | Event::End(Tag::CodeBlock(_)) => out.push('\n'),
16-
Event::End(Tag::Paragraph) => {
17-
out.push('\n');
18-
out.push('\n');
19-
}
16+
Event::End(Tag::Paragraph) => out.push_str("\n\n"),
2017
Event::Start(_)
2118
| Event::End(_)
2219
| Event::Html(_)

0 commit comments

Comments
 (0)