css-html-js-minify icon indicating copy to clipboard operation
css-html-js-minify copied to clipboard

Breaking css minification bug fix: condense_hex_colors breaks 8-digit hex strings

Open StefanTodoran opened this issue 2 years ago • 0 comments
trafficstars

Changed the regular expression in condense_hex_colors to match only 6 digit hex strings using negative look-ahead. Previous behavior would break 8 digit long hex strings, because it would result in an invalid 5 digit hex string. Also added a test file for CSS minification, which contains some tests for hex color minification.

Closed the original request and reopened this one since I had made some modifications to the master branch which I didn't intend to include in the pull request, now the changes are in their own branch.

StefanTodoran avatar Jun 11 '23 18:06 StefanTodoran