element-hq / element-hq/element-android
Wrong rendering of `<pre>` formatted body
- Dominant language
- Kotlin
- Stars
- 3.7k
- Forks
- 917
- PR merge metrics
- No merged PRs in 30d
Description
### Steps to reproduce
I have a bot that send those two messages following each others (I obfuscated the names):
```
"content": {
"body": " 1111111111222222\n 1234567890123456789012345\n 1) 122 ××××× erdnaxeli\n 2) 102 ××××× Xxxxxx\n 3) 99 ×××× Xxxxxx Xxxxx\n 4) 97 ××××× xxxxxx\n 5) 91 ××××× XxxxxxXxxxxxx\n 6) 81 ××××× xxxxxxx\n 7) 54 ××× xxxxxx\n 8) 37 + ×× xxxxx",
"msgtype": "m.text",
"format": "org.matrix.custom.html",
"formatted_body": "
1111111111222222\n 1234567890123456789012345\n 1) 122 ××××× erdnaxeli\n 2) 102 ××××× Xxxxxx\n 3) 99 ×××× Xxxxxx Xxxx\n 4) 97 ××××× xxxxxx\n 5) 91 ××××× XxxxxxXxxxxxx\n 6) 81 ××××× xxxxxxx\n 7) 54 ××× xxxxxx\n 8) 37 + ×× xxxxx"
},
```
```
"content": {
"body": " 9) 29 ××× Xxxxxxx Xxxxxxx\n10) 28 ×× xxxxxxxx\n11) 15 ×× xxXxxxxXxXxxXxx\n12) 0 Xxxxxx\n13) 0 Xxxxxxxxx",
"msgtype": "m.text",
"format": "org.matrix.custom.html",
"formatted_body": "
9) 29 ××× Xxxxxxx Xxxxxxx\n10) 28 ×× xxxxxxx\n11) 15 ×× xxXxxxxXxXxxXxx\n12) 0 Xxxxxx\n13) 0 Xxxxxxxxx"
},
```
### Outcome
#### What did you expect?
I expect the rendering to be the same as in element web:

#### What happened instead?
But it is wrong:

It seems like the first message is interpreted as markdown? And the second one does not even have a monospace font, and I don't know what happens with the header.
### Your phone model
Moto G5 Plus
### Operating system version
Android 8.1.0
### Application version and app store
Element 1.3.7 from playstore
### Homeserver
cervoi.se
### Will you send logs?
No
Contributor guide
Assessment
This issue has not been assessed yet.