element-hq / element-hq/element-android

Code blocks collapse spaces destroying whitespace-sensitive code

Open
#8,153 3 comments 3 reactions 0 assignees View on GitHub
A-Timeline O-Occasional S-Minor T-Defect
Dominant language
Kotlin
Stars
3.7k
Forks
917
Avg merge
8d 20h
Merged PRs (30d)
1

Description

Send a code block that contains some whitespace-sensitive code. This could be something serious such as a Python snippet, which becomes impossible to interpret, other indented code which merely becomes illegible, or fun things such as the ASCII art in the following example.

### Steps to reproduce

Send a message using:

Element Nightly version: 2023022001
Olm version: 3.2.12

![image](https://user-images.githubusercontent.com/2803622/220347856-bc865a6f-084d-4c74-8a7f-7558b13e9193.png)

### Outcome

#### What did you expect?
match desktop

#### What happened instead?
all spaces at the start of a line are collapsed, except the first line
![image](https://user-images.githubusercontent.com/2803622/220349105-8e1f19f2-7ba3-47ab-90e0-c0a985d2cbce.png)

### Your phone model

_No response_

### Operating system version

13

### Application version and app store

1.5.25 F-Droid

### Homeserver

synapse 1.77.0

### Will you send logs?

No

### Are you willing to provide a PR?

No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.