4

In the following list, what is the proper way to insert a line break before the final element where indicated (courtesy mspaint)?

screenshot http://i.snag.gy/D7EsT.jpg

I expected the above to have the line break there, but there was no break. I kludged it by writing <br/><br/> at the end of the last item in the nested list but I couldn't figure out the "correct" way to do it.


Edit: Regarding some answers below. This is the general format I want, and am wondering how to do it without an explicit <br/><br/>:

  • Item with space below.

  • Item with space below.

    • Group of items with no spaces.
    • Group of items with no spaces.
    • Group of items with no spaces. Last item, should have space below.

  • Last item in list.

Without <br><br> after the last item in the inner group, the last item in the toplevel list does not have a space above it. It looks like, based on the answers so far though, that there isn't really a "proper" way to do this, but the workarounds are easy.

4

There isn't really a proper way. Our markdown engine will try to merge adjacent lists and that's that. You've found one way around it.

There are others, like using a HTML comment (<!-- -->) to break up adjacent blocks of formatting that would otherwise be merged:

  • Here's a list

    • with a sublist

  • and a HTML comment above this bullet point to keep this from merging with the list above
* Here's a list

 * with a sublist

<!-- -->

* and a HTML comment above this bullet point to keep this from merging with the list above

HTML comments can also be used to break apart adjacent quote boxes or blocks of code.

  • 5
    Note for future readers: this only visually works for bulleted lists. For a numbered list, the count would reset after the break. – animuson Nov 8 '13 at 6:57
  • Huh, that's an interesting approach. It still seems like a kludge, but I will start doing that. I like how it doesn't involve adding markup to the last item of the sublist. @animuson Ah good point thanks. – Jason C Nov 8 '13 at 6:58
  • 1
    It appears <br/><br/> is a better choice to reliably break up lists as you wish to. It will keep the numbering correctly too, in numbered lists. – ADTC Feb 2 '14 at 4:52

You must log in to answer this question.

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