Element-web: Formating error with backtick in chats (for codes)

Created on 13 Dec 2018  路  7Comments  路  Source: vector-im/element-web

Description

Steps to reproduce

  • Type a text
  • Put 3 backtick on the current line instead of a blank (new) line
  • Type some code
  • Put 3 more backtick

Some text
< at the end of the previous line My code

Sorry I don't know how to disable formatting in github

Describe how what happens differs from what you expected.

The message is deformed
flameshot-2018-12-13-04-58-39

It should be able to correct the formatting before displaying the text. This works well in discord.

Version information

  • Platform: desktop, probably web too

  • OS: Linux Mint

  • Version: 0.17.8
bug wontfix

All 7 comments

Could you verify the same happens here: https://spec.commonmark.org/dingus/

Yes it does. I guess this is the engine riot uses to render text.

But look on Discord:
image

I think I'm not alone when I say that sometimes I type too fast. The current render is quite ugly and break the design and overall experience.

the following code show properly in Discord:
image
image

It's just down to what dialect of markdown discord uses, the one riot chose has the behaviour you describe

And it's not optimal and should be fixed. It's why I opened an issue.

It can only be fixed upstream in the commonmark specification, or by switching dialect which has been rejected several times, so maybe best would be to make a ticket with them

I'm adding wontfix to indicate that we won't special-case changing this behaviour. I totally agree it's ugly and we could do better by special-casing, but I from a maintenance perspective being able to say "we use commonmark and commonmark does _this_" is hugely preferable to "we use commonmark except where we don't".

I'm totally neutral about what markdown dialect we use, as long as we use it without patches/tweaks that are hard to maintain :)

Thanks @lampholder I totally understand. I will try to conceive commonmark then :)

Was this page helpful?
0 / 5 - 0 ratings