Subject: | Text::Markdown fails to skip block-level elements when using HTML5 attribute quoting |
Date: | Sun, 23 Aug 2009 10:26:29 -0400 |
To: | bug-Text-Markdown [...] rt.cpan.org |
From: | John SJ Anderson <genehack [...] genehack.org> |
INPUT: <h1 class=center>about</h1>
EXPECTED: <h1 class=center>about</h1>
RECEIVED: <p><h1 class=center>about</h1></p>
SUGGESTED PATCH:
--- Markdown.pm.orig 2009-08-23 10:16:57.000000000 -0400
+++ Markdown.pm 2009-08-23 10:16:22.000000000 -0400
@@ -342,6 +342,8 @@
".
+?" # "Attribute value"
|
'.
+?' # 'Attribute value'
+ |
+ [\s]
+? # Attribute value (HTML5)
)
)* # Zero
or more
}x;
Apologies for the lack of tests but I couldn't find what seemed like
the right thing to change -- if you like the patch but want an updated
test case to go with it let me know and I'll do more digging.
chrs,
john.
PS: Just found your git repo; expect a pull request with the above
patch momentarily...