element-hq / element-hq/element-android

Element android doesn't correctly render closed pre/code blocks.

Open
#2,231 2 comments 5 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
3.7k
Forks
917
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Element android does not render some events correctly.

**To Reproduce**

Given this event:
```
{
"type": "m.room.message",
"content": {
"msgtype": "m.text",
"body": "```\nredis 38511 14.3 0.0 184916 7760 ? Ssl Jul20 16606:55 /usr/bin/redis-server 10.102.243.76:6479\nredis-e+ 32187 0.1 0.0 721232 24668 ? Ssl Sep21 35:44 | \\_ /redis_exporter\n```\nah, maybe more CPU if it gets busy, but even so",
"format": "org.matrix.custom.html",
"formatted_body": "

redis    38511 14.3  0.0 184916  7760 ?        Ssl  Jul20 16606:55 /usr/bin/redis-server 10.102.243.76:6479\nredis-e+ 32187  0.1  0.0 721232 24668 ?        Ssl  Sep21  35:44  |   \\_ /redis_exporter\n
\n

ah, maybe more CPU if it gets busy, but even so

\n"
}
}
```
View in element web and element android
**Expected behavior**
It should look the same;

However on element android the text after the code block is still in preformatted text mode when it shouldn't be.

**Screenshots**
![element-web](https://user-images.githubusercontent.com/1917473/95477201-ff151380-097f-11eb-9ace-96a8400e7479.png)
vs:
![element-android](https://user-images.githubusercontent.com/1917473/95477381-31267580-0980-11eb-819e-4494b0d29d2e.jpeg)

**Smartphone (please complete the following information):**
- Device: Motorola One Vision
- OS: Android 10

**Additional context**
- Element android from play store (no beta channels)
- Homeserver: matrix.org

Add any other context about the problem here.

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.