element-x-android icon indicating copy to clipboard operation
element-x-android copied to clipboard

Enumerations (lists) always start at 1 (<ol start="xxx"> attribute ignored)

Open andkit opened this issue 1 year ago • 2 comments

Steps to reproduce

Send a message like that: 3. drittens

Then look at the message in elementx

Outcome

What did you expect?

See the text 3. drittens

What happened instead?

See the text 1. drittens

Additional info

Looking at the message source it seems that the markdown parser turns this into an enumeration[1], but the renderer of the message in elementx ignores the start attribute

{
  "type": "m.room.message",
  "content": {
    "msgtype": "m.text",
    "body": "3. drittens",
    "format": "org.matrix.custom.html",
    "formatted_body": "<ol start=\"3\">\n<li>drittens</li>\n</ol>\n",
    "m.mentions": {}
  }
}

Desktop-Element and the "classic" element client on android both render this correctly, but elementx(android) and (can't verify this myself) fluffy chat (ios) both render this wrong

Caused a little confusion and a few chuckles in our group chat, as we noticed it with a text that started with 13. April and showed as 1. April for some of us, so we thought it might be a late aprils fools

[1] Which was surprising and unintended in the orginal message, but probably correct

Your phone model

Samsung S23

Operating system version

Android 14

Application version and app store

Element X 0.4.17 - play store

Homeserver

matrix.org

Will you send logs?

No

Are you willing to provide a PR?

No

andkit avatar Apr 13 '24 17:04 andkit

Duplicate of #1522?

rom4nik avatar Apr 15 '24 22:04 rom4nik

Looks a lot like it, yes. I did search for similar issues first, but didn't see this one (I think closed issues aren't searched by default and I'm not sure I remembered to untick the is:open)

Sorry for the duplicate.

I would however suggest to revisit the decision to not implement this. Sure, intentionally creating a list that starts with a number other than 1 is pretty exotic, but when it happens by accident it can be pretty bad (think mixing up dates of a meeting, or a flight or something like that). It wouldn't even need to be fully supported, just falling back on the unformatted text would by fine too (as that at least won't change the meaning of the message)

andkit avatar Apr 15 '24 23:04 andkit

Closed as duplicate.

bmarty avatar Jun 26 '24 13:06 bmarty