Problem with UL followed by OL
    Tomas Doran 
    bobtfish at bobtfish.net
       
    Wed Jan 23 20:06:21 EST 2008
    
    
  
On 23 Jan 2008, at 21:14, Kazutaka Matsuda wrote:
> I got a problem with UL followed by by OL
>  when I using perl module "Text-Markdown-1.0.5".
>
> I wrote the following markdown code.
> - a
> - b
>
> 1. 1
> 2. 2
> I expected that Text-Markdown would produce the following HTML.
> <ul>
> <li>a</li>
> <li>b</li>
> </ul>
> <ol>
> <li>1</li>
> <li>2</li>
> </ol>
> However, "Text-Markdown-1.0.5" generated the following HTML.
> <ul>
> <li>a</li>
> <li><p>b</p></li>
> <li><p>1</p></li>
> <li>2</li>
> </ul>
> At least for me, this is not intuitive.
yes, it's a bug :)
>
> I attached a patch for "Markdown.pm" in "Text-Markdown-1.0.5".
> And, I also attached a simple test for the above.
Awesome!
> I checked that patched "Text-Markdown" returns the same result as I  
> expected.
Yep, it appears to work in simple cases, but unfortunately when I  
patch it to Text::MultiMarkdown (which has a reasonably comprehensive  
test suite) then it makes it crap itself:
t/20fulldocs-multimarkdown..................6/33
#   Failed test 'Docs test: Lists'
#   at t/20fulldocs-multimarkdown.t line 25.
t/20fulldocs-multimarkdown..................23/33 perl(4289) malloc:  
***  Deallocation of a pointer not malloced: 0x118af10; This could be  
a double free(), or free() called with the middle of an allocated  
block; Try setting environment variable MallocHelp to see tools to  
help debug
perl(4289) malloc: ***  Deallocation of a pointer not malloced:  
0x18dd400; This could be a double free(), or free() called with the  
middle of an allocated block; Try setting environment variable  
MallocHelp to see tools to help debug
perl(4289) malloc: ***  Deallocation of a pointer not malloced:  
0x1189cd0; This could be a double free(), or free() called with the  
middle of an allocated block; Try setting environment variable  
MallocHelp to see tools to help debug
Which is real helpful. Thank you perl...
So I'm going to see what I can work out / which part is causing that  
(I assume the backref in the regex)....
I'll get back to you as soon as I've got it sorted / when I have news :)
Please feel free to poke me off list about this!
Cheers
Tom
    
    
More information about the Markdown-Discuss
mailing list