3

Comparison

The blockquote Markdown syntax > plays nicely with all other features in Markdown syntax.

A heading

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

  • Ut wisi enim ad minim veniam.
  • Duis autem vel eum iriure dolor.

Vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.

  1. Nam liber tempor cum soluta nobis eleifend.
  2. Typi non habent claritatem insitam.

Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius.


Mirum est notare quam littera gothica.

Claritas est etiam processus dynamicus.

Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.

However, spoiler >! syntax breaks on all the cases above:

! ## A heading

! Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

! - Ut wisi enim ad minim veniam. ! - Duis autem vel eum iriure dolor.

! Vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.

! 2. Nam liber tempor cum soluta nobis eleifend. ! 3. Typi non habent claritatem insitam.

! > Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius.

! ---

! Mirum est notare quam littera gothica.

! Claritas est etiam processus dynamicus.

! Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.

If I add >! on all lines, it changes into one big mess in spoiler.

Workarounds

Of course, I am aware of the workarounds, which is quite ugly if you ask me. (I guess there are many such posts on all the meta sites, but I'm too lazy to dig them up).

Proposal

My proposal is that the syntax for spoiler >! should disallow spacing between > and !. I think the above restriction should allow spoiler block to be parsed the same way as blockquote, and allow it to play nicely with other Markdown syntaxes.

For the case of alternating blocks:

>! Spoiler
> Not
> Really
>! Hidden

It should render as 3 different blockquotes, with the blockquotes from the first line and the fourth line hidden.

Allow paragraph inside spoiler block:

>! Spoiler

>! More spoilers

The case above should render as a single block quote with 2 paragraphs.

We can add a restriction that spoiler block can't contain another spoiler block (arbitrarily deeply nested inside), and the inner spoiler block would be rendered as a regular blockquote.

You must log in to answer this question.

Browse other questions tagged .