Skip to content

Commit

Permalink
Take non digit characters into account and fix transform
Browse files Browse the repository at this point in the history
  • Loading branch information
sibbng authored Apr 4, 2021
1 parent bfcd05f commit 0848bdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jit/pluginUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function asValue(modifier, lookup = {}, { validate = () => true, transform = (v)
}

// add spaces around operators inside calc() that do not follow an operator or (
return transform(value).replace(/(?<=^calc\(.+?)(?!\b-\d)(?<![-+*/(])([-+*/])/g, ' $1 ')
return transform(value).replace(/(?<=calc\(.+?)(?!\b-\b)(?<![-+*/(])([-+*/])/g, ' $1 ')
}

function asUnit(modifier, units, lookup = {}) {
Expand Down

0 comments on commit 0848bdf

Please sign in to comment.