khajavi / pandoc

Automatically exported from code.google.com/p/pandoc
GNU General Public License v2.0
0 stars 0 forks source link

blockquote inside list breaks list, unlike markdown.pl #190

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Input:

* list item

  > blockquote in list item

  continuation of list item

* list item 2

Markdown.pl does what I want, putting the blockquote in the list item:

<ul>
<li><p>list item</p>

<blockquote>
  <p>blockquote in list item</p>
</blockquote>

<p>continuation of list item</p></li>
<li><p>list item 2</p></li>
</ul>

pandoc mangles it, closing and reopening the list for the blockquote.

<ul
><li
  >list item</li
  ></ul
><blockquote
><p
  >blockquote in list item</p
  ></blockquote
><p
>continuation of list item</p
><ul
><li
  >list item 2</li
  ></ul
>

Original issue reported on code.google.com by evan.mar...@gmail.com on 26 Dec 2009 at 4:58

GoogleCodeExporter commented 9 years ago
Looking further, even this is handled differently:

====
* foo

  bar
====

According to the markdown docs, you need 4 spaces for continued paragraphs, but 
markdown.pl accepts 2.  Not sure what the resolution of this bug should be...

Original comment by evan.mar...@gmail.com on 26 Dec 2009 at 5:16

GoogleCodeExporter commented 9 years ago
Yes, according to the markdown spec:

List items may consist of multiple paragraphs. Each subsequent paragraph in a 
list
item must be indented by either 4 spaces or one tab...

Apparently markdown.pl isn't consistent about this, but I'm content if pandoc
satisfies the markdown syntax description.  (Search the markdown-discuss list 
for
"four space rule" to see some relevant discussion of the pros and cons.)

It helps if you just make a habit of starting list items in column 5:

*   list item

    > blockquote in list item

    continuation of list item

*   list item 2

Original comment by fiddloso...@gmail.com on 27 Dec 2009 at 12:20