[cl-markdown-devel] list items with newlines

Hans Halvorson hhalvors at Princeton.EDU
Sat Feb 3 10:59:44 UTC 2007


(Perl)-markdown and cl-markdown give different outputs for the
following input:


* A first list item
with a hard return
* A second list item


The perl-markdown output:


<ul>
<li>A first list item
with a hard return</li>
<li>A second list item</li>
</ul>


The cl-markdown output:


<ul>
<li>A first list item</li>
</ul>with a hard return 
<ul>
<li>A second list item</li>
</ul>


So, cl-markdown reads the newline followed by a line not beginning with
"*" as indicating that the list item and list are ending.

For further diagnosis, I did: 

(cl-containers:contents (chunks (chunk-source 
"* A first list item
with a hard return
* A second list item")))

=> #(#<CHUNK NIL/1 1 lines LINE-STARTS-WITH-BULLET-P LINE-IS-NOT-EMPTY-P>
  #<CHUNK NIL/0 1 lines LINE-IS-NOT-EMPTY-P LINE-STARTS-WITH-BULLET-P>
  #<CHUNK NIL/1 1 lines LINE-STARTS-WITH-BULLET-P END-OF-DOCUMENT>)

But at this point, I can't tell what is happening: is the second chunk
(line) being misread?  Or is this OK, and the problem occurs later,
e.g. when the first and second chunks should be merged?

Thanks,
Hans



More information about the Cl-markdown-devel mailing list