question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Edit composer doesn't show the original markdown and can mess up the formatting of lists

See original GitHub issue

Sorry if this is a duplicate, I couldn’t find any other issue about this.

For example, let’s consider this message:

Here's a list:

1. foo
    - bar
    - baz

Which renders like this on Riot:

image

When sent, if I click the edit button, this is what appears in the edit composer:

Here's a list:
1. foo
  - bar
  - baz

Which doesn’t have the same level of indentation, and also removed the blank line between the paragraph and the line (this latter point doesn’t affect rendering here, but I’ve seen cases where it did).

If I edit this message (e.g. adding an extra r to bar) without fixing the markdown by hand, the message renders like this:

image

Without having any knowledge of how the composer works under the hood, it seems weird to me that it doesn’t just show what’s in the body of the original event.

I can’t see any error in the console when showing up the composer.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:9
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
robintowncommented, Mar 8, 2022

What @t3chguy said, but there are also https://github.com/vector-im/element-web/issues/10725 and https://github.com/vector-im/element-web/issues/20387 to track the more general idea of preserving Markdown verbatim

0reactions
baboliviercommented, Mar 9, 2022

Oh right so it’s not closed by https://github.com/matrix-org/matrix-react-sdk/pull/7300 but as a duplicate of https://github.com/vector-im/element-web/issues/10725 (now that the list formatting part of the problem is fixed). Gotcha, thanks 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

MultiMarkdown Composer Is My Markdown Based Text Editor
The original Markdown only outputs to HTML. iA Writer is another product which supports MMD, with a few tweaks. Secondly, Composer is ...
Read more >
Markdown formatting of code blocks in lists - Stack Overflow
Run composer install (you must already have Composer installed). Install blt alias: composer blt-alias. Inspect the HTML and notice how list ...
Read more >
Formatting text with Markdown - Zendesk help
Markdown is a simple markup language you can use to easily add formatting, links, and images to plain text. You can use it...
Read more >
Locking down and locking up Typora's Markdown support #369
I happen to love the ToC, but it doesn't work in GitHub. We could have a feature that exports the typora markdown file...
Read more >
Markdown with Scrivener - AppleVis
Markdown syntax is pretty unforgiving, and your first Markdown ... While Scrivener supports lists and indents, the two features don't work ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found