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
Hi Hans,
Thanks for your bug report. I agree that the first list item in the last example should not have paragraph tags around it.
By the way, shouldn't the xhtml tags be lower case by default?
Whoopts, yes. I've been using Allegro Common Lisp in "modern" mode lately and it translates my keywords like :h1 into :h1 which outputs as "h1". ANSI Common Lisp, of course, reads :h1 as :H1 and produces "H1".
This will be corrected in the next release (which will happen as soon as I figure out how to fix the first bug you found!
thanks again, -- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM
Gary,
Thank you for your very quick attention to these issues. I just grabbed version 0.8.3, and can confirm that it fixes the list issue, as well as the uppercase <H#> tags issue. But the tag fix does not seem to have been propagated to all html tags, e.g. paragraph tags are still coming out as <P>. For example,
(markdown "
New paragraph " :format :html :stream nil)
=> "<P>New paragraph </P>"
Best wishes, Hans
At Fri, 02 Feb 2007 13:21:43 -0500, Gary King wrote:
Hi Hans,
Thanks for your bug report. I agree that the first list item in the last example should not have paragraph tags around it.
By the way, shouldn't the xhtml tags be lower case by default?
Whoopts, yes. I've been using Allegro Common Lisp in "modern" mode lately and it translates my keywords like :h1 into :h1 which outputs as "h1". ANSI Common Lisp, of course, reads :h1 as :H1 and produces "H1".
This will be corrected in the next release (which will happen as soon as I figure out how to fix the first bug you found!
thanks again,
Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM
Ack! My bad. I forgot to test on a lisp other than Allegro modern mode -- head slap.
I fix this later tonight (or over the weekend).
On Feb 2, 2007, at 3:19 PM, Hans Halvorson wrote:
Gary,
Thank you for your very quick attention to these issues. I just grabbed version 0.8.3, and can confirm that it fixes the list issue, as well as the uppercase <H#> tags issue. But the tag fix does not seem to have been propagated to all html tags, e.g. paragraph tags are still coming out as <P>. For example,
(markdown "
New paragraph " :format :html :stream nil)
=> "<P>New paragraph </P>"
Best wishes, Hans
At Fri, 02 Feb 2007 13:21:43 -0500, Gary King wrote:
Hi Hans,
Thanks for your bug report. I agree that the first list item in the last example should not have paragraph tags around it.
By the way, shouldn't the xhtml tags be lower case by default?
Whoopts, yes. I've been using Allegro Common Lisp in "modern" mode lately and it translates my keywords like :h1 into :h1 which outputs as "h1". ANSI Common Lisp, of course, reads :h1 as :H1 and produces "H1".
This will be corrected in the next release (which will happen as soon as I figure out how to fix the first bug you found!
thanks again,
Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM
-- Gary Warren King, metabang.com Cell: (413) 885 9127 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM
cl-markdown-devel@common-lisp.net