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

Commit 9f4d269

Browse files
committed
minor: use a single push_str instead of 2 push
1 parent 0ed815f commit 9f4d269

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)