markdown preview: Insert missing line break on hard break (#9687)
Closes #8990 For this input ``` Test \ Test ``` pulldown_cmark reports ``` Start(Paragraph) Text(Borrowed("Test ")) HardBreak Text(Borrowed("Test")) End(Paragraph) ``` Previously `Event::HardBreak` just marked the paragraph block as completed and ignored all the remaining text inside the paragraph. Before: See https://github.com/zed-industries/zed/issues/8990#issue-2173197637 After:  Release Notes: - Fixed markdown preview not handling hard breaks (e.g. `\`) correctly ([#8990](https://github.com/zed-industries/zed/issues/8990)).
This commit is contained in:
parent
7367350f41
commit
6d78737973
1 changed files with 1 additions and 1 deletions
|
@ -202,7 +202,7 @@ impl<'a> MarkdownParser<'a> {
|
|||
}
|
||||
|
||||
Event::HardBreak => {
|
||||
break;
|
||||
text.push('\n');
|
||||
}
|
||||
|
||||
Event::Text(t) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue