Skip to content
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

Leading space characters not rendered in messages #4175

Open
kieranlane opened this issue Jan 20, 2025 · 1 comment
Open

Leading space characters not rendered in messages #4175

kieranlane opened this issue Jan 20, 2025 · 1 comment
Labels
A-Event Rendering How events are shown in the timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@kieranlane
Copy link

Steps to reproduce

Spaces are not being honoured during the rendering of messages in EX for Android (See attached screenshot).

Image

Outcome

What did you expect?

Additional spaces should be present in the rendered version of the message. Like with Element Web:

Image

What happened instead?

Leading spaces appear to be removed.

Your phone model

No response

Operating system version

No response

Application version and app store

No response

Homeserver

No response

Will you send logs?

No

Are you willing to provide a PR?

No

@kieranlane kieranlane added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Jan 20, 2025
@jmartinesp
Copy link
Member

I'm pretty sure this is caused by the markdown -> HTML conversion: for HTML any whitespace that's not entered as non-breakable whitespace (NBSP) will be ignored, unless it's a single whitespace between 2 non-whitespace values (this can be tested here, i.e.).

I think the only way to fix this would be to pre-process the MD somehow to translate the whitespace groups / leading / trailing whitespace to NBSP chars.

@jmartinesp jmartinesp added S-Minor Impairs non-critical functionality or suitable workarounds exist O-Occasional Affects or can be seen by some users regularly or most users rarely A-Event Rendering How events are shown in the timeline labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Event Rendering How events are shown in the timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

No branches or pull requests

2 participants