Created
February 2, 2014 10:11
-
-
Save GoalSmashers/8765858 to your computer and use it in GitHub Desktop.
clean-css patch 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commit acb8fdfb8e3fdaab93e0b436487f56f208b5d108 | |
| Author: Jakub Pawlowicz <contact@jakubpawlowicz.com> | |
| Date: Sun Jan 19 16:51:46 2014 +0000 | |
| Fixed units regexp. | |
| diff --git a/lib/properties/compact.js b/lib/properties/compact.js | |
| index af51026..42c4065 100644 | |
| --- a/lib/properties/compact.js | |
| +++ b/lib/properties/compact.js | |
| @@ -17,7 +17,7 @@ module.exports = (function () { | |
| }; | |
| // Regexes used for stuff | |
| - var cssUnitRegexStr = '(\\.?\\d+(px|%|em|rem|in|cm|mm|ex|pt|pc|)|auto|inherit)'; | |
| + var cssUnitRegexStr = '(\\.?\\d+\\.?\\d*(px|%|em|rem|in|cm|mm|ex|pt|pc|)|auto|inherit)'; | |
| var cssFunctionNoVendorRegexStr = '[A-Z]?(\\-|[A-Z]|[0-9])+\\(([A-Z]|[0-9]| |\\+|\\-|%|\\.)*\\)'; | |
| var cssFunctionVendorRegexStr = '\\-(\\-|[A-Z]|[0-9])+\\(([A-Z]|[0-9]| |\\+|\\-|%|\\.)*\\)'; | |
| var cssFunctionAnyRegexStr = '(' + cssFunctionNoVendorRegexStr + '|' + cssFunctionVendorRegexStr + ')'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment