On Tue, May 01, 2007 at 08:38:15PM -0400, Joey Hess wrote:
> Seems that the use of gen_extract_tagged call in markdown extracts the
> following block from my test case:
> 
> <div class="baz">
> <div class="bar">
> foo
> </div>
> 
> Which leaves the final closing div dangling. 
> 
> It's having trouble finding the right closing tag. I checked, and
> Text::Balanced is generating a closetag of "</div>". Problem is, this
> matches the first closing div, rather than the second one. It doesn't
> seem to notice that there is a nested div.
> 
> I am not yet sure if the bug is in how Text::Balanced is used, or if
> Text::Balanced really cannot handle this. It seems to have code to check
> for a nested tag, but that check is not firing.

The regular expression that Markdown passes to Text::Balanced to match
opening tags contains a backreference to the attribute value quote
character.  Text::Balanced wraps this expression in another set of
parentheses when matching for a nested tag, which breaks this
backreference.

I don't know whether this is a bug in Markdown or Text::Balanced, nor
do I see a good way to fix it.  Help!

-- 
Matt


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to