3

I noticed a puzzling trend lately, editing a lot of TFA content (since it contains spoiler blocks).

A lot of people format their spoiler blocks with NO empty line after preceding text, like this:

I'm talking about this secret stuff
>! my Spoiler

as opposed to:

I'm talking about this secret stuff

>! my Spoiler

Is there a reason this is done? Is that a method I should be using to (my normal way - due to stylistic readability preference - is to always precede quote blocks, including spoiler blocks, with an empty line)?

Or merely random preference with no effect and done as personal preference?

(side note: Not sure if this is unique to spoiler blocks or all quote blocks - I never noticed the trend before with quote blocks but doesn't mean it wasn't there)

  • 1
    Just my opinion I prefer your style, makes it easier to edit if nothing else. I just think we're getting a lot of users who aren't familiar with writing stylistically good questions. Plus, the spoiler markup is notoriously buggy, no need to tempt fate :) – KutuluMike Dec 24 '15 at 15:02
  • 6
    Doesn't the output look identical for both possibilities? – Rand al'Thor Dec 24 '15 at 15:19
7

I suggest that the reason is at least partly related to the official Markdown Editing Help page:

When a user clicks on the advanced help link, the spoiler tag demo/example itself that pops up on the instructions page shows no spacing between the non-spoiler and spoiler segement.

Screenshot of the “Spoilers” section of the help page.

  • 1
    Thanks, @JakeGould. :) Was trying to add that example in. – Aith Jan 2 '16 at 5:05
9

There is literally no difference.

The example below shows two spoiler blocks – one with a newline, one without. The output HTML is the same in both cases. There is no difference between the two.

As such, I think it comes down to personal preference. There’s no “better” way of doing it.

I prefer having the empty line there, because I think it looks nicer, and I use some Markdown parsers which don’t start a blockquote unless it’s preceded by a newline – but it’s not a strong preference. Don’t overthink it.


Example

Markdown source:

I’ve written a paragraph
>! and there isn’t a newline in the Markdown source.



I've written another paragraph

>! And although you can’t see it, there’s a newline in the Markdown source.

HTML output:

<p>I’ve written a paragraph</p>

<blockquote class="spoiler">
  <p> and there isn’t a newline in the Markdown source.</p>
</blockquote>

<p></p>

<p>I've written another paragraph</p>

<blockquote class="spoiler">
  <p> And although you can’t see it, there’s a newline in the Markdown source.</p>
</blockquote>

Rendered output:

I’ve written a paragraph

and there isn’t a newline in the Markdown source.

I've written another paragraph

And although you can’t see it, there’s a newline in the Markdown source.

1

The only situation I can think of in which it would make a difference is when your question/answer is using bullet points or a numbered list.

Without empty line:

  • In film #1 we learn

    spoiler #1

  • In film #2 we learn

    spoiler #2

  • In film #3 we learn

    spoiler #3

With empty line:

  • In film #1 we learn

spoiler #1

  • In film #2 we learn

spoiler #2

  • In film #3 we learn

spoiler #3

You'll notice that, if you're making a list with bullets/numbers, it looks neater to have no empty line. See What are the things that “The Force Awakens” borrowed/parallel from “A New Hope?” for an example of how nice it looks without an empty line. I believe I was the one who made that edit, since lists become much harder to read and follow if there is an empty line.


This also applies to normal blockquotes; this is not specific to spoiler tags.

  • 1
    When I do bullets, I simply prefix the blockquotes with 3 spaces: ` >` and that fixes the alignment :) – DVK-on-Ahch-To Dec 27 '15 at 0:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .