element-hq / element-hq/element-web
Line breaks are lost when editing a message containing markdown
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
### Steps to reproduce
When you have a `_` or any markdown character (like `<`) in a message and edit the message, it will add a backslash, then the renderer will parse it as a plain text, and ignore breaklines.
Example:
```
blabla/_test
https://test.com/
```
### Outcome
#### What did you expect?
Breaklines need to be kept after editing.
#### What happened instead?
first message without editing
second message with editing
I think the fix is in Markdown.ts:toPlainText()
It would need something like:
```
renderer.softbreak = function () {
this.lit("\n");
};
```
### Operating system
_No response_
### Application version
_No response_
### How did you install the app?
_No response_
### Homeserver
_No response_
### Will you send logs?
No
Contributor guide
Assessment
This issue has not been assessed yet.