Skip to content

[toPlainText] bug in message edition #33032

@pierrebrunet289

Description

@pierrebrunet289

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
Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ElectronA-MarkdownA-Message-EditingO-OccasionalAffects or can be seen by some users regularly or most users rarelyS-MinorImpairs non-critical functionality or suitable workarounds existT-Defect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions