postcss / postcss-calc

PostCSS plugin to reduce calc()
MIT License
215 stars 33 forks source link

fix: do not consume number token if expression ends with '.' #164

Open ludofischer opened 2 years ago

ludofischer commented 2 years ago

Fix #132

\b also matches '.', so the regex for the number expression would match 41 in 41.7rpx. Then UNKNOWN_DIMENSION would match .7rpx and create the invalid sequence NumberExpression, UnknownDimension.