Closed alexanderchr closed 8 years ago
The negation was added in https://github.com/css-modules/postcss-modules-values/commit/c24881e338f9857d2ecc91a4d10074b15d37552e to allow commas within parentheses.
Replacing [^\)]+
with .+
seems to work in this scenario and does not break any tests. Am i missing something obvious?
@value primary: color(red lightness(10%));
.Outputs
:export { primary: color(red saturation(10%); }
Appears to be caused by
const matchValueDefinition = /(?:,\s+|^)([\w-]+):?\s+("[^"]*"|'[^']*'|\w+\([^\)]+\)|[^,]+)\s?/g
and especially the negation in\w+\([^\)]+\)
.