Closed GoogleCodeExporter closed 8 years ago
The markdown documentation
(http://daringfireball.net/projects/markdown/syntax#list)
says: "If list items are separated by blank lines, Markdown will wrap the items
in
<p> tags in the HTML output."
But that leaves a lot of ambiguity about what to do when some of the items have
blank
lines and others don't. Pandoc follows a simple rule (see
http://johnmacfarlane.net/pandoc/README.html#nested-lists), which diverges from
Markdown.pl on some edge cases. Perhaps a better rule could be used, and I am
open
to suggestions.
Your case gives me one idea: pandoc could be smarter about when to treat the
blank
space after the LAST list item as indicating a paragraph. Right now it treats
this
as a paragraph if it is not the case that all the other list items are "Plain"
(non-paragraph). But perhaps pandoc should only pay attention to the last
block in
each list item. I think that would give nicer results for your cases, but you'd
still get a paragraph before the code block.
Original comment by fiddloso...@gmail.com
on 24 Oct 2008 at 9:14
I think a paragraph around the code block is fine. It's the extra space around
single
sentences in a bullet that I don't like. Still, it may just be a limitation of
the
syntax. Generally pandoc does what I need.
Original comment by jgbailey@gmail.com
on 24 Oct 2008 at 10:22
I improved the heuristic for dealing with the final block in a list in r1470.
This helps with the final item in your first case. I'll close this issue now,
because I can't think of a way to do better that will be relatively simple and
work in general (without mind reading).
Original comment by fiddloso...@gmail.com
on 25 Oct 2008 at 10:10
Original issue reported on code.google.com by
jgbailey@gmail.com
on 24 Oct 2008 at 6:15Attachments: