Skip to content

Commit 3f55b00

Browse files
committed
REplace soft breaks in markdown with spaces
1 parent daa0138 commit 3f55b00

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

crates/ide/src/markdown_remove.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ pub(crate) fn remove_markdown(markdown: &str) -> String {
1111
for event in parser {
1212
match event {
1313
Event::Text(text) | Event::Code(text) => out.push_str(&text),
14-
Event::SoftBreak | Event::HardBreak | Event::Rule | Event::End(Tag::CodeBlock(_)) => {
15-
out.push('\n')
16-
}
14+
Event::SoftBreak => out.push(' '),
15+
Event::HardBreak | Event::Rule | Event::End(Tag::CodeBlock(_)) => out.push('\n'),
1716
Event::End(Tag::Paragraph) => {
1817
out.push('\n');
1918
out.push('\n');

0 commit comments

Comments
 (0)