-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[toPlainText] bug in message edition #33032
Copy link
Copy link
Open
Labels
A-ElectronA-MarkdownA-Message-EditingO-OccasionalAffects or can be seen by some users regularly or most users rarelyAffects or can be seen by some users regularly or most users rarelyS-MinorImpairs non-critical functionality or suitable workarounds existImpairs non-critical functionality or suitable workarounds existT-Defect
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-ElectronA-MarkdownA-Message-EditingO-OccasionalAffects or can be seen by some users regularly or most users rarelyAffects or can be seen by some users regularly or most users rarelyS-MinorImpairs non-critical functionality or suitable workarounds existImpairs non-critical functionality or suitable workarounds existT-Defect