element-hq / element-hq/element-x-ios

Tables don't render

Open
#1,416 9 comments 4 reactions 0 assignees View on GitHub
A-Timeline T-Enhancement X-Needs-Design X-Needs-Product
Dominant language
Swift
Stars
945
Forks
372
Avg merge
21h 42m
Merged PRs (30d)
67

Description

### Steps to reproduce

1. Compose a table in GFM syntax
2. Send the message

### Outcome

#### What did you expect?

The table to render in the timeline as table

#### What happened instead?

The table content is squashed into what looks like a plain text string

![Screenshot 2023-07-28 at 12 05 20](https://github.com/vector-im/element-x-ios/assets/1137962/21579cbd-f37f-424c-8913-e2c5a55c83d0)

Notably the same message renders the table on Element Web. So the HTML representation seems to be correct. Just the rendering on Element X appears to be broken.

![Screenshot 2023-07-28 at 12 05 33](https://github.com/vector-im/element-x-ios/assets/1137962/cbb96236-d87c-4fb5-af86-84dd3ac4873e)

```
{
"content": {
"body": "| foo | bar |\n| - | - |\n| bar | foo |",
"format": "org.matrix.custom.html",
"formatted_body": "\n\nfoobarbarfoo\n",
"msgtype": "m.text"
},
"room_id": "!zxMbOwUzGXOQTceaJf:matrix.org",
"type": "m.room.message"
}
```

### Your phone model

_No response_

### Operating system version

_No response_

### Application version

_No response_

### Homeserver

_No response_

### Will you send logs?

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.