Weird parsing rule for nested [quote] preceded by newline


(Dan Dascalescu) #1

It looks like if there’s a blank line before a [quote], the [quote] will be rendered verbatim, unless the string before that blank line is another [quote]?

What I expect is that the text below is rendered the same, whether blank line #3 exists or not:

In regards to...

Here's a claim...



[Announce] Search & replace / batch process Discourse posts
(Jeff Atwood) #2

We are not in a position where we want to encourage nested quotes, though. If anything quite the opposite.

(Dan Dascalescu) #3

I too wish my users quoted even more judiciously, but such is human nature. To that user’s credit, they’ve trimmed down much of the quoted posts.

I’m just trying to faithfully migrate existing quotes from forums that support them properly.

Looks like the problem is weirder though: if there’s any blank line between the a [quote] and the next [quote], the second will be rendered verbatim. Fortunately you can have blank lines in the innermost quote.

(Dan Dascalescu) #4

If nested quotes shouldn’t be encouraged, then perhaps they shouldn’t work at all. But it appears they work sometimes, and it’s hard to tell exactly when. That’s hard to distinguish from a Markdown parsing bug looking for a reason not to get fixed :slight_smile: (I’m not saying it’s easy; just that acknowledging incorrect nested quote parsing as a bug is a step forward).

For example, this post has only one level of nesting. The first nested quote is rendered, while the second, much as I tried editing, isn’t. @zogstrip, you have admin on the QS forum, might you try your hand at making the second quote show?

(Régis Hanol) #5

I’m afraid it’s not possible right now without fixing our quote dialect. The issue is that it’s super hard with our current markdown implementation and might be fixed when we migrate to a different one.