demydd / pandoc

Automatically exported from code.google.com/p/pandoc
0 stars 0 forks source link

Lists with empty lines separating items #98

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, I couldn't find documentation for this feature:

$ echo -e '- a\n- b\n- c' | pandoc | tr -d '\n' 

<ul><li  >a</li  ><li  >b</li  ><li  >c</li  ></ul>

$ echo -e '- a\n\n- b\n\n- c' | pandoc | tr -d '\n' 

<ul><li  ><p    >a</p    ></li  ><li  ><p    >b</p    ></li  ><li  ><p   
>c</p    ></li  ></ul>

Frequently, I tend to double-space list items (especially if they're long).
 I never realized there was a difference until recently (I've been using
LaTeX, where there seems to be no difference).  Why does this insert <p>
tags in the second example?

Original issue reported on code.google.com by yanghate...@gmail.com on 24 Oct 2008 at 7:08

GoogleCodeExporter commented 8 years ago
Does this help?
http://johnmacfarlane.net/pandoc/README.html#nested-lists

Remember, list items can contain arbitrary block-level elements, including
paragraphs.  Pandoc interprets your items as paragraphs, because of the
space that follows.

Original comment by fiddloso...@gmail.com on 24 Oct 2008 at 7:40

GoogleCodeExporter commented 8 years ago
Also, see the official markdown documentation
(http://daringfireball.net/projects/markdown/syntax#list): "If list items are
separated by blank lines, Markdown will wrap the items in <p> tags in the HTML 
output."

Original comment by fiddloso...@gmail.com on 24 Oct 2008 at 9:08