Skip to content

Formatting creates extra newlines #8179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
WIPocket opened this issue Feb 26, 2023 · 3 comments · Fixed by #8187
Closed

Formatting creates extra newlines #8179

WIPocket opened this issue Feb 26, 2023 · 3 comments · Fixed by #8187
Assignees
Labels
A-Composer A-Markdown O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems X-Regression

Comments

@WIPocket
Copy link

WIPocket commented Feb 26, 2023

Steps to reproduce

Send texts containing formatting
Screenshot_20230226-121654_1

Outcome

What did you expect?

Same functionality as old version of Element Android and other clients.
Element Desktop 1.11.23:
image

What happened instead?

Most formatting options start a new line.

This seems to only be the case when it is the first formatted text in a paragraph:
Screenshot_20230226-125116_1
With the markdown:

one _two_ three

four _five_ six

Your phone model

Google Pixel 7

Operating system version

GrapheneOS stable / Android 13

Application version and app store

Version 1.5.25 [40105250] (F-f74a885a), Matrix SDK Version 1.5.25 (f74a885), olm version 3.2.12, from F-Droid

Homeserver

Synapse 1.77.0

Will you send logs?

No

Are you willing to provide a PR?

No

@WIPocket WIPocket added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Feb 26, 2023
@Florian14 Florian14 added A-Markdown A-Composer S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Occasional Affects or can be seen by some users regularly or most users rarely labels Feb 27, 2023
@Florian14
Copy link
Contributor

It seems not but can you confirm that you're not using the new rich text editor? @jonnyandrew, do you have any changes in mind with the new composer that could have caused a regression on this part?

@WIPocket
Copy link
Author

I was not using the new rich text editor. Toggling "Enable rich text editor" or "Enable LaTeX mathematics" does not change the rendering of these messages.

It renders wrong regardless of what client I send the message from, be it this new version of Element Android, Element Desktop or gomuks.

The event source looks like this:

{
  "room_id": "<redacted>",
  "type": "m.room.message",
  "content": {
    "msgtype": "m.text",
    "body": "this _is_ underscores",
    "format": "org.matrix.custom.html",
    "formatted_body": "this <em>is</em> underscores"
  }
}

@jonnyandrew
Copy link
Contributor

jonnyandrew commented Feb 28, 2023

It could be caused by #8011 which attempted to work around the following (seemingly related) issue:

@jonnyandrew jonnyandrew self-assigned this Feb 28, 2023
jonnyandrew added a commit that referenced this issue Mar 6, 2023
* Extend workaround for extra new lines in timeline

Closes #8179

Caused by noties/Markwon#423

* Refactor

Co-authored-by: Yoan Pintas <[email protected]>

---------

Co-authored-by: Yoan Pintas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Composer A-Markdown O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems X-Regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants