Skip to content

Commit d76fb36

Browse files
Backports correct decimal point regex from 5.x branch.
See 9d633cb.
1 parent 5f8fdfd commit d76fb36

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

History.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
==================
33

44
* Backports prototype pollution fix from 5.x branch.
5+
* Backports correct decimal point regex from 5.x branch.
56

67
[4.2.3 / 2020-01-28](https://github.com/jakubpawlowicz/clean-css/compare/v4.2.2...v4.2.3)
78
==================

lib/optimizer/level-1/optimize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ function buildPrecisionOptions(roundingPrecision) {
606606

607607
if (optimizable.length > 0) {
608608
precisionOptions.enabled = true;
609-
precisionOptions.decimalPointMatcher = new RegExp('(\\d)\\.($|' + optimizable.join('|') + ')($|\W)', 'g');
609+
precisionOptions.decimalPointMatcher = new RegExp('(\\d)\\.($|' + optimizable.join('|') + ')($|\\W)', 'g');
610610
precisionOptions.zeroMatcher = new RegExp('(\\d*)(\\.\\d+)(' + optimizable.join('|') + ')', 'g');
611611
}
612612

0 commit comments

Comments
 (0)