mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-11 12:46:07 +00:00
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: ![image](https://github.com/zed-industries/zed/assets/53836821/48237ea6-d749-4207-89a3-b0f146b0e544) 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…
Reference in a new issue