I have come across some weird behavior in the interaction between links, lists, and headings (cl-markdown v 0.8.2). The following two forms act as they should:
(markdown "## Common Lisp
* An item with a link [link](link.html) and some following text." :format :html :stream nil)
=>
"<H2>Common Lisp </H2> <UL><LI>An item with a link <a href="link.html">link</a> and some following text. </LI> </UL>"
(markdown "## Common Lisp
* An item with a link [link](link.html) and some following text. * Another item" :format :html :stream nil)
=>
"<H2>Common Lisp </H2> <UL><LI>An item with a link <a href="link.html">link</a> and some following text. </LI> <LI>Another item </LI> </UL>"
But the following form wraps the first list item in paragraph tags:
(markdown "## Common Lisp
* An item with a link [link](link.html) and some following text.
## A second level heading
* Another item" :format :html :stream nil)
=>
"<H2>Common Lisp </H2> <UL><LI><P>An item with a link <a href="link.html">link</a> and some following text. </P></LI> </UL><H2>A second level heading </H2> <UL><LI>Another item </LI> </UL>"
I also compared the output for this last string with the output from Perl-markdown, and it does *not* add the paragraph tags.
By the way, shouldn't the xhtml tags be lower case by default?
Thanks, Hans