I would like to insert a single blank line between my bullet elements. However, I'm having a hard time making this work in pandoc markdown.
I'm using pandoc -f markdown -t html my_doc.md
to perform the conversion.
Right now, I have something like:
* Lorem
* ipsum
* Dolor
* sit amet
This produces something like in Stackoverflow markdown, where the blank lines are ignored:
Lorem
Dolor
In order to get a line break between Lorem and Dolor, I put a <br>
. However, this produces 3 blank lines:
* Lorem
* ipsum
<br>
* Dolor
* sit amet
But that looks like this:
How to I get a single blank line between my top-level (or whatever level) bullet elements?
First, let me explain the results you are seeing: blank lines between list elements are ignored, so you'll have only a single top-level list no matter how many newlines you insert in the Markdown source.
By adding the <br>
, there are no longer only blank lines, so the result is two lists, with another paragraph between them (containing just the line break). So you get two default spacing between blocks (list to para, para to list), plus the extra line break in the paragraph. The default spacing is about the same height as a line, therefore the three-line spacing.
What you want, I assume, is to get the two top-most items to be treated as belonging to separate lists. This can be done by adding a comment between the lists. It does not create a paragraph, but still marks the lists as being separate entities:
* Lorem
* ipsum
<!-- -->
* Dolor
* sit amet
The result will be a single inter-block vertical space.