Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-Parapgraph Markdown-quote is rendered incorrectly #8786

Closed
pludi opened this issue Feb 19, 2019 · 8 comments · Fixed by matrix-org/matrix-react-sdk#7210
Closed

Multi-Parapgraph Markdown-quote is rendered incorrectly #8786

pludi opened this issue Feb 19, 2019 · 8 comments · Fixed by matrix-org/matrix-react-sdk#7210
Labels
A-Composer A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@pludi
Copy link

pludi commented Feb 19, 2019

Description

Markdown-quoting of multiple paragraphs into a single quote does not insert paragraphs, but instead renders into a single line.

Steps to reproduce

In any channel post a multi-paragraph quote, eg.

> This is a quote-test with
>
> multiple paragraphs

The expected result would be (through pandoc -f markdown -t html5)

<blockquote>
<p>This is a quote-test with</p>
<p>Multiple paragraphs</p>
</blockquote>

Instead the resulting formatted_body content is

<blockquote>\nThis is a quote-test withMultiple paragraphs\n</blockquote>\n

Version information

  • Server: Self-hosted, Synapse 0.99.1.1+stretch1
  • Platform: Web and Desktop

For the web app:

  • Browser: Chrome 72.0.3626.109
  • OS: Ubuntu 18.04
  • URL: riot.im/app

For the desktop app:

  • OS: Ubuntu 18.0.4
  • Version: 1.0.1
@lampholder lampholder added T-Defect P2 S-Major Severely degrades major functionality or product features, with no satisfactory workaround A-Timeline type:composer labels Mar 14, 2019
@hpdeifel
Copy link

hpdeifel commented Nov 5, 2019

This still happens in riot 1.5.0, so I believe the type:old-composer label is incorrect.

@t3chguy
Copy link
Member

t3chguy commented Nov 5, 2019

Tested against commonmark dingus and indeed we are doing something wrong

@PeterNerlich
Copy link

I had a few furious encounters with this recently (I was posting messages and whole emails into a room for the group to see as a quote). One thing I now noticed, it seems to work when the message consists of multiple elements (like a blockquote and normal text) - when it is only a single blockquote, it seems to break

@jooize
Copy link

jooize commented Aug 27, 2020

This issue drives me crazy as I frequently send messages only consisting of quotes.

Element Version 1.7.4

@ZanderBrown
Copy link

Hate to be that guy but this is still happening and it's driving me loopy

Once or twice I've somehow got it to work by accident but the vast majority of the time newlines (and any associated whitespace) just get stripped out

Attempting to fix the resultant message often hits #12535 so now my multipara quote isn't a quote at all…

@ghost
Copy link

ghost commented Jun 1, 2021

I've run into the same issue and done a bit of experimenting to feel around its edges. What I've found:

For the formatting to fail, the blockquote must be the only thing in the message.

Text both before it and after it gets rid of this problem.

The problem does not occur when two lines are immediately consecutive.

This:

> multi-line
> blockquote

puts two lines, as expected:

multi-line
blockquote

though the source (or whatever I saw when I hit Edit) is a little weird:

>
multi-line
> blockquote

The problem does occur when there is an empty line between them.

This:

> multi-line
> 
> blockquote

renders without a break at all:

multi-lineblockquote

with the source text:

>
multi-lineblockquote

Mixing the two rules in one message does not affect their behavior.

> multi-line blockquote
> both without spaces
> 
> and with them
> and then not again

renders as

multi-line blockquote
both without spacesand with them
and then not again

and editing it shows this source:

> 
multi-line blockquote
> both without spacesand with them
> and then not again

Hopefully this information is useful to someone or another.


Edit: added resulting message sources
Edit 2: fix a couple Markdown mistakes

@williamkray
Copy link

wow, i'm sad to see how long this has been open. i run into this almost every day.

@brendanzab
Copy link

brendanzab commented Nov 3, 2021

To workaround this issue, you can precede a multi-paragraph quote (that is to say, a quote containing quoted blank lines) with something else, either "foo" or a separate empty quote:

>

> like
>
> this
foo
> or
>
> this

Nested quotes can be done by applying this rule again:

>

> >
>
> > like
> >
> > this

Just noting this down here for next time I encounter this and end up in an infuriating edit-fix loop with #12535. It would be great to see this fixed, it is extremely frustrating to encounter this!

I'm also not sure how these bodges render in other services connected via matrix, or other matrix clients, so use this with care. 😬

@SimonBrandner SimonBrandner added O-Occasional Affects or can be seen by some users regularly or most users rarely and removed P2 labels Nov 4, 2021
su-ex added a commit to SchildiChat/matrix-react-sdk that referenced this issue Dec 7, 2021
* Add unread indicator to the timelineCard header icon ([\matrix-org#7156](matrix-org#7156)). Fixes element-hq/element-web#19635.
* Only show core navigation elements (call/chat/notification/info) when a widget is maximised ([\matrix-org#7114](matrix-org#7114)). Fixes element-hq/element-web#19632.
* Improve ThreadPanel ctx menu accessibility ([\matrix-org#7217](matrix-org#7217)). Fixes element-hq/element-web#19885.
* Allow filtering room list during treeview navigation ([\matrix-org#7219](matrix-org#7219)). Fixes element-hq/element-web#14702.
* Add right panel chat timeline ([\matrix-org#7112](matrix-org#7112)). Fixes element-hq/element-web#19633.
* Hide server options hint when disable_custom_urls is true ([\matrix-org#7215](matrix-org#7215)). Fixes element-hq/element-web#19919.
* Improve right panel resize handle usability ([\matrix-org#7204](matrix-org#7204)). Fixes element-hq/element-web#15145. Contributed by @weeman1337.
* Spaces quick settings ([\matrix-org#7196](matrix-org#7196)).
* Maximised widgets always force a call to be shown in PIP mode ([\matrix-org#7163](matrix-org#7163)). Fixes element-hq/element-web#19637.
* Group Labs flags ([\matrix-org#7190](matrix-org#7190)).
* Show room context details in forward dialog ([\matrix-org#7162](matrix-org#7162)). Fixes element-hq/element-web#19793.
* Remove chevrons from RoomSummaryCard_Button ([\matrix-org#7137](matrix-org#7137)). Fixes element-hq/element-web#19644.
* Disable op/deop commands where user has no permissions ([\matrix-org#7161](matrix-org#7161)). Fixes element-hq/element-web#15390.
* Add option to change the size of images/videos in the timeline ([\matrix-org#7017](matrix-org#7017)). Fixes element-hq/element-meta#49 element-hq/element-web#1520 and element-hq/element-web#19498.
* Fix left panel glow in Safari ([\matrix-org#7236](matrix-org#7236)). Fixes element-hq/element-web#19863.
* Fix newline on edit messages with quotes ([\matrix-org#7227](matrix-org#7227)). Fixes element-hq/element-web#12535. Contributed by @renancleyson-dev.
* Guard against null refs in findSiblingElement ([\matrix-org#7228](matrix-org#7228)).
* Tweak bottom of space panel buttons in expanded state ([\matrix-org#7213](matrix-org#7213)). Fixes element-hq/element-web#19921.
* Fix multiline paragraph rendering as single line ([\matrix-org#7210](matrix-org#7210)). Fixes element-hq/element-web#8786. Contributed by @renancleyson-dev.
* Improve room list message previews ([\matrix-org#7224](matrix-org#7224)). Fixes element-hq/element-web#17101 and element-hq/element-web#16169.
* Fix EmojiPicker lazy loaded rendering bug ([\matrix-org#7225](matrix-org#7225)). Fixes element-hq/element-web#15341.
* Prevent default avatar in UserInfo having pointer cursor ([\matrix-org#7218](matrix-org#7218)). Fixes element-hq/element-web#13872.
* Prevent duplicate avatars in Event List Summaries ([\matrix-org#7222](matrix-org#7222)). Fixes element-hq/element-web#17706.
* Respect the home page as a context for the Home space ([\matrix-org#7216](matrix-org#7216)). Fixes element-hq/element-web#19554.
* Fix RoomUpgradeWarningBar exploding ([\matrix-org#7214](matrix-org#7214)). Fixes element-hq/element-web#19920.
* Polish threads misalignments and UI diversion ([\matrix-org#7209](matrix-org#7209)). Fixes element-hq/element-web#19772, element-hq/element-web#19710 element-hq/element-web#19629 and element-hq/element-web#19711.
* Fix Manage Restricted Join Rule Dialog for Spaces ([\matrix-org#7208](matrix-org#7208)). Fixes element-hq/element-web#19610.
* Fix wrongly showing unpin in pinned messages tile with no perms ([\matrix-org#7197](matrix-org#7197)). Fixes element-hq/element-web#19886.
* Make image size constrained by height when using the ImageSize.Large option ([\matrix-org#7171](matrix-org#7171)). Fixes element-hq/element-web#19788.
* Prevent programmatic scrolling within truncated room sublists ([\matrix-org#7191](matrix-org#7191)).
* Remove leading slash from /addwidget Jitsi confs ([\matrix-org#7175](matrix-org#7175)). Fixes element-hq/element-web#19839. Contributed by @AndrewFerr.
* Fix automatic composer focus, regressed by threads work ([\matrix-org#7167](matrix-org#7167)). Fixes element-hq/element-web#19479.
* Show space members when not invited even if summary didn't fail ([\matrix-org#7153](matrix-org#7153)). Fixes element-hq/element-web#19781.
* Prevent custom power levels from breaking roles & permissions tab ([\matrix-org#7160](matrix-org#7160)). Fixes element-hq/element-web#19812.
* Room Context Menu should respond to tag changes ([\matrix-org#7154](matrix-org#7154)). Fixes element-hq/element-web#19776.
* Fix an edge case when trying to join an upgraded room ([\matrix-org#7159](matrix-org#7159)).
su-ex added a commit to SchildiChat/element-desktop that referenced this issue Dec 7, 2021
* Add unread indicator to the timelineCard header icon ([\#7156](matrix-org/matrix-react-sdk#7156)). Fixes element-hq/element-web#19635.
* Only show core navigation elements (call/chat/notification/info) when a widget is maximised ([\#7114](matrix-org/matrix-react-sdk#7114)). Fixes element-hq/element-web#19632.
* Improve ThreadPanel ctx menu accessibility ([\#7217](matrix-org/matrix-react-sdk#7217)). Fixes element-hq/element-web#19885.
* Allow filtering room list during treeview navigation ([\#7219](matrix-org/matrix-react-sdk#7219)). Fixes element-hq/element-web#14702.
* Add right panel chat timeline ([\#7112](matrix-org/matrix-react-sdk#7112)). Fixes element-hq/element-web#19633.
* Hide server options hint when disable_custom_urls is true ([\#7215](matrix-org/matrix-react-sdk#7215)). Fixes element-hq/element-web#19919.
* Improve right panel resize handle usability ([\#7204](matrix-org/matrix-react-sdk#7204)). Fixes element-hq/element-web#15145. Contributed by @weeman1337.
* Spaces quick settings ([\#7196](matrix-org/matrix-react-sdk#7196)).
* Maximised widgets always force a call to be shown in PIP mode ([\#7163](matrix-org/matrix-react-sdk#7163)). Fixes element-hq/element-web#19637.
* Group Labs flags ([\#7190](matrix-org/matrix-react-sdk#7190)).
* Show room context details in forward dialog ([\#7162](matrix-org/matrix-react-sdk#7162)). Fixes element-hq/element-web#19793.
* Remove chevrons from RoomSummaryCard_Button ([\#7137](matrix-org/matrix-react-sdk#7137)). Fixes element-hq/element-web#19644.
* Disable op/deop commands where user has no permissions ([\#7161](matrix-org/matrix-react-sdk#7161)). Fixes element-hq/element-web#15390.
* Add option to change the size of images/videos in the timeline ([\#7017](matrix-org/matrix-react-sdk#7017)). Fixes element-hq/element-meta#49 element-hq/element-web#1520 and element-hq/element-web#19498.
* Fix left panel glow in Safari ([\#7236](matrix-org/matrix-react-sdk#7236)). Fixes element-hq/element-web#19863.
* Fix newline on edit messages with quotes ([\#7227](matrix-org/matrix-react-sdk#7227)). Fixes element-hq/element-web#12535. Contributed by @renancleyson-dev.
* Guard against null refs in findSiblingElement ([\#7228](matrix-org/matrix-react-sdk#7228)).
* Tweak bottom of space panel buttons in expanded state ([\#7213](matrix-org/matrix-react-sdk#7213)). Fixes element-hq/element-web#19921.
* Fix multiline paragraph rendering as single line ([\#7210](matrix-org/matrix-react-sdk#7210)). Fixes element-hq/element-web#8786. Contributed by @renancleyson-dev.
* Improve room list message previews ([\#7224](matrix-org/matrix-react-sdk#7224)). Fixes element-hq/element-web#17101 and element-hq/element-web#16169.
* Fix EmojiPicker lazy loaded rendering bug ([\#7225](matrix-org/matrix-react-sdk#7225)). Fixes element-hq/element-web#15341.
* Prevent default avatar in UserInfo having pointer cursor ([\#7218](matrix-org/matrix-react-sdk#7218)). Fixes element-hq/element-web#13872.
* Prevent duplicate avatars in Event List Summaries ([\#7222](matrix-org/matrix-react-sdk#7222)). Fixes element-hq/element-web#17706.
* Respect the home page as a context for the Home space ([\#7216](matrix-org/matrix-react-sdk#7216)). Fixes element-hq/element-web#19554.
* Fix RoomUpgradeWarningBar exploding ([\#7214](matrix-org/matrix-react-sdk#7214)). Fixes element-hq/element-web#19920.
* Polish threads misalignments and UI diversion ([\#7209](matrix-org/matrix-react-sdk#7209)). Fixes element-hq/element-web#19772, element-hq/element-web#19710 element-hq/element-web#19629 and element-hq/element-web#19711.
* Fix Manage Restricted Join Rule Dialog for Spaces ([\#7208](matrix-org/matrix-react-sdk#7208)). Fixes element-hq/element-web#19610.
* Fix wrongly showing unpin in pinned messages tile with no perms ([\#7197](matrix-org/matrix-react-sdk#7197)). Fixes element-hq/element-web#19886.
* Make image size constrained by height when using the ImageSize.Large option ([\#7171](matrix-org/matrix-react-sdk#7171)). Fixes element-hq/element-web#19788.
* Prevent programmatic scrolling within truncated room sublists ([\#7191](matrix-org/matrix-react-sdk#7191)).
* Remove leading slash from /addwidget Jitsi confs ([\#7175](matrix-org/matrix-react-sdk#7175)). Fixes element-hq/element-web#19839. Contributed by @AndrewFerr.
* Fix automatic composer focus, regressed by threads work ([\#7167](matrix-org/matrix-react-sdk#7167)). Fixes element-hq/element-web#19479.
* Show space members when not invited even if summary didn't fail ([\#7153](matrix-org/matrix-react-sdk#7153)). Fixes element-hq/element-web#19781.
* Prevent custom power levels from breaking roles & permissions tab ([\#7160](matrix-org/matrix-react-sdk#7160)). Fixes element-hq/element-web#19812.
* Room Context Menu should respond to tag changes ([\#7154](matrix-org/matrix-react-sdk#7154)). Fixes element-hq/element-web#19776.
* Fix an edge case when trying to join an upgraded room ([\#7159](matrix-org/matrix-react-sdk#7159)).
su-ex added a commit to SchildiChat/element-web that referenced this issue Dec 7, 2021
* Add unread indicator to the timelineCard header icon ([\element-hq#7156](matrix-org/matrix-react-sdk#7156)). Fixes element-hq#19635.
* Only show core navigation elements (call/chat/notification/info) when a widget is maximised ([\element-hq#7114](matrix-org/matrix-react-sdk#7114)). Fixes element-hq#19632.
* Improve ThreadPanel ctx menu accessibility ([\element-hq#7217](matrix-org/matrix-react-sdk#7217)). Fixes element-hq#19885.
* Allow filtering room list during treeview navigation ([\element-hq#7219](matrix-org/matrix-react-sdk#7219)). Fixes element-hq#14702.
* Add right panel chat timeline ([\element-hq#7112](matrix-org/matrix-react-sdk#7112)). Fixes element-hq#19633.
* Hide server options hint when disable_custom_urls is true ([\element-hq#7215](matrix-org/matrix-react-sdk#7215)). Fixes element-hq#19919.
* Improve right panel resize handle usability ([\element-hq#7204](matrix-org/matrix-react-sdk#7204)). Fixes element-hq#15145. Contributed by @weeman1337.
* Spaces quick settings ([\element-hq#7196](matrix-org/matrix-react-sdk#7196)).
* Maximised widgets always force a call to be shown in PIP mode ([\element-hq#7163](matrix-org/matrix-react-sdk#7163)). Fixes element-hq#19637.
* Group Labs flags ([\#7190](matrix-org/matrix-react-sdk#7190)).
* Show room context details in forward dialog ([\element-hq#7162](matrix-org/matrix-react-sdk#7162)). Fixes element-hq#19793.
* Remove chevrons from RoomSummaryCard_Button ([\element-hq#7137](matrix-org/matrix-react-sdk#7137)). Fixes element-hq#19644.
* Disable op/deop commands where user has no permissions ([\element-hq#7161](matrix-org/matrix-react-sdk#7161)). Fixes element-hq#15390.
* Add option to change the size of images/videos in the timeline ([\element-hq#7017](matrix-org/matrix-react-sdk#7017)). Fixes element-hq/element-meta#49 element-hq#1520 and element-hq#19498.
* Fix left panel glow in Safari ([\element-hq#7236](matrix-org/matrix-react-sdk#7236)). Fixes element-hq#19863.
* Fix newline on edit messages with quotes ([\element-hq#7227](matrix-org/matrix-react-sdk#7227)). Fixes element-hq#12535. Contributed by @renancleyson-dev.
* Guard against null refs in findSiblingElement ([\#7228](matrix-org/matrix-react-sdk#7228)).
* Tweak bottom of space panel buttons in expanded state ([\element-hq#7213](matrix-org/matrix-react-sdk#7213)). Fixes element-hq#19921.
* Fix multiline paragraph rendering as single line ([\element-hq#7210](matrix-org/matrix-react-sdk#7210)). Fixes element-hq#8786. Contributed by @renancleyson-dev.
* Improve room list message previews ([\element-hq#7224](matrix-org/matrix-react-sdk#7224)). Fixes element-hq#17101 and element-hq#16169.
* Fix EmojiPicker lazy loaded rendering bug ([\element-hq#7225](matrix-org/matrix-react-sdk#7225)). Fixes element-hq#15341.
* Prevent default avatar in UserInfo having pointer cursor ([\element-hq#7218](matrix-org/matrix-react-sdk#7218)). Fixes element-hq#13872.
* Prevent duplicate avatars in Event List Summaries ([\element-hq#7222](matrix-org/matrix-react-sdk#7222)). Fixes element-hq#17706.
* Respect the home page as a context for the Home space ([\element-hq#7216](matrix-org/matrix-react-sdk#7216)). Fixes element-hq#19554.
* Fix RoomUpgradeWarningBar exploding ([\element-hq#7214](matrix-org/matrix-react-sdk#7214)). Fixes element-hq#19920.
* Polish threads misalignments and UI diversion ([\element-hq#7209](matrix-org/matrix-react-sdk#7209)). Fixes element-hq#19772, element-hq#19710 element-hq#19629 and element-hq#19711.
* Fix Manage Restricted Join Rule Dialog for Spaces ([\element-hq#7208](matrix-org/matrix-react-sdk#7208)). Fixes element-hq#19610.
* Fix wrongly showing unpin in pinned messages tile with no perms ([\element-hq#7197](matrix-org/matrix-react-sdk#7197)). Fixes element-hq#19886.
* Make image size constrained by height when using the ImageSize.Large option ([\element-hq#7171](matrix-org/matrix-react-sdk#7171)). Fixes element-hq#19788.
* Prevent programmatic scrolling within truncated room sublists ([\element-hq#7191](matrix-org/matrix-react-sdk#7191)).
* Remove leading slash from /addwidget Jitsi confs ([\element-hq#7175](matrix-org/matrix-react-sdk#7175)). Fixes element-hq#19839. Contributed by @AndrewFerr.
* Fix automatic composer focus, regressed by threads work ([\element-hq#7167](matrix-org/matrix-react-sdk#7167)). Fixes element-hq#19479.
* Show space members when not invited even if summary didn't fail ([\element-hq#7153](matrix-org/matrix-react-sdk#7153)). Fixes element-hq#19781.
* Prevent custom power levels from breaking roles & permissions tab ([\element-hq#7160](matrix-org/matrix-react-sdk#7160)). Fixes element-hq#19812.
* Room Context Menu should respond to tag changes ([\element-hq#7154](matrix-org/matrix-react-sdk#7154)). Fixes element-hq#19776.
* Fix an edge case when trying to join an upgraded room ([\element-hq#7159](matrix-org/matrix-react-sdk#7159)).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Composer A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants