# markdown preview: Insert missing line break on hard break \(\#9687\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/6d787379735268dd485b0a453485568052dc1462)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 6d787379735268dd485b0a453485568052dc1462

Requested commit: 6d787379735268dd485b0a453485568052dc1462

Commit: 6d787379735268dd485b0a453485568052dc1462

Tree: 747e8c1802db740e905c174e3d772c26a3f395a7

Author: Bennet Bo Fenner

Committer: GitHub

## Message

````
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)).
````

## Parents

- [7367350f41b98d575aebdfe2206c1723d154d8c9](https://git.cafe/gitcafe/zed/commit/7367350f41b98d575aebdfe2206c1723d154d8c9?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/6d787379735268dd485b0a453485568052dc1462?format=markdown)
