element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
Apache License 2.0
10.69k stars 1.88k forks source link

Ctrl+I (italics) generates incorrect Markdown if only part of a word is selected #27380

Closed sboukortt closed 3 days ago

sboukortt commented 3 weeks ago

Steps to reproduce

  1. Write a message, for example “Wow, this is a trimodal distribution!”
  2. Select the “tri” in “trimodal”
  3. Press Ctrl+I

Outcome

What did you expect?

That Element would generate Markdown that produces “Wow, this is a trimodal distribution!” (this achieved, for example, with Wow, this is a *tri*modal distribution!)

What happened instead?

Element uses _ to italicise the text, but they are not interpreted as such in the middle of words, so they appear as-is in the sent message

Operating system

No response

Application version

Element: 1.11.64; Olm: 3.2.15

How did you install the app?

No response

Homeserver

No response

Will you send logs?

No

sboukortt commented 3 weeks ago

Incidentally, it seems that GitHub has exactly the same bug, although Discord doesn’t. (It always use *.)