On Saturday 07 March 2009, Sherwood Botsford wrote:
> It's a monolog week for me.  Answering my own post. Again.
>
> Turns out it's not that simple.  Consider the following input fragment:
> (For clarity, I'm compressing the double spacing.  All <div> tags have
> a blank line before and after.
>
> # Headline outside div
> <div>
> # Headline inside div
> </div>
>
> Run through MMD I get:
> <h1 id="headlineoutsidediv">Headline outside div</h1>
> <div>
> # Headline inside div
> </div>
>
> IF I use DIV instead of div
> <h1 id="headlineoutsidediv">Headline outside div</h1>
>
> <p><DIV></p>
>
> <h1 id="headlineinsidediv">Headline inside div</h1>
>
> <p></DIV></p>
>
> Which causes the w3c validator the whine.
> I get this form of result if I have <div id=foobar>
> but the first form of result if I have <div id="foobar">
>
>
> This behaviour is identical for both MMD 1.0.24 (CPAN) and for MMD
> 2.0.b5 (FP's website)
>
> I think that the regex that's scaning for a div tag is looking only
> for a well formed one.
> Being either wrong case or with a malformed id it's treated as text,
> and surrounded by <p> tags.

That's a bug.

> If the divs match the expression it doesn't process the content.

That's how it should be. Markdown does not alter / change stuff inside HTML 
tags (think <code> or similar). At least PHP Markdown Extra supports a 
proprietary `markdown="1"` attribute for tags which should get their contents 
markdowned.

-- 
Milian Wolff
m...@milianw.de
http://milianw.de

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss

Reply via email to