Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CSS-Packer CPAN distribution.

Report information
The Basics
Id: 66208
Status: resolved
Priority: 0/
Queue: CSS-Packer

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

Bug Information
Severity: (no value)
Broken in: 1.000
Fixed in: 1.000001



Subject: Declarations like "foo:0" are removed entirely from output CSS
Any declaration with a value of "0", with no space between the colon and value (so "foo:0", but not "foo:1" or "foo: 0") get removed entirely from the output. Eg: echo "foo{border:0;margin:1;padding: 0}" | perl -MCSS::Packer -e 'my $css = <>; CSS::Packer::minify(\$css); print $css' Outputs: foo{ margin:1; padding:0; }
This seems to be caused by a bug in Regexp::RegGrp, in _process, it attempts to (I presume) replace undefined submatches with an empty string by doing: map { $_ ||= ''; } @submatches. But that's checking for truth, not definedness, so values of "0" are inadvertently being replaced too.
Should be fixed now. Thanks for reporting. On Sat Feb 26 16:15:21 2011, DAN wrote: Show quoted text
> This seems to be caused by a bug in Regexp::RegGrp, in _process, it > attempts to (I presume) replace undefined submatches with an empty string > by doing: map { $_ ||= ''; } @submatches. But that's checking for truth, > not definedness, so values of "0" are inadvertently being replaced too. >