Skip Menu |

This queue is for tickets about the CSS CPAN distribution.

Report information
The Basics
Id: 71940
Status: new
Priority: 0/
Queue: CSS

People
Owner: Nobody in particular
Requestors: SPACEBAT [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.09
Fixed in: (no value)



Subject: URLs quoted with apostrophe fail to parse
Our CSS files have a lot of url('../some/path.png') and CSS::Parse::Heavy always stops on the line before such a style. I finally narrowed it down to what appears to be a bug in Parse::RecDescent, because the literal for an apostrophe, "'" normally works but doesn't seem to work as the last part of a rule. The attached patch works around this by using '\'' instead. I will follow this up with P::RD but as this workaround is semantically equivalent figured its worth submitting this here. Cheers and thanks for a great module.
Subject: CSS-Parse-PRDGrammar.pm.diff
--- CSS/Parse/PRDGrammar.pm 2011-03-23 09:30:09.000000000 +1030 +++ /apps/webteam/lib/perl/CSS/Parse/PRDGrammar.pm 2011-10-26 13:15:14.000000000 +1030 @@ -115,7 +115,7 @@ | '"' {$return = $item[1]} | macro_nonascii {$return = $item[1]} | macro_escape {$return = $item[1]} - )(s?) "'" {return "'".join('', @{$item[2]})."'"} + )(s?) '\'' {return "'".join('', @{$item[2]})."'"} macro_nl: /\\n|\\r\\n|\\r|\\f/ {$return = $item[1]} macro_w: /[ \\t\\r\\n\\f]*/ {$return = $item[1]}