fix: Function with dot inside name - #134
Conversation
shellscape
commented
Apr 9, 2021
@niksy this looks good. Please update your snapshots by merging from upstream/master and running |
f852fa1 to
d02db41Compareniksy
commented
Apr 12, 2021
@shellscape OK, done, but now I got a lot of other updated files, is that OK? |
Looks like you need to merge from upstream/master and reinstall dependencies because 0357c82 was merged before you updated your snapshots |
d02db41 to
6dd49beCompareniksy
commented
Apr 12, 2021
@shellscape yup, forgot to install new dependencies, now it looks OK! |
jonathantneal
commented
Apr 12, 2021
Fixing the hang is important. Capturing symbols as identifiers would break compatibility with CSS. Is there a way to fix the former without introducing the later? |
shellscape
commented
Apr 12, 2021
@jonathantneal any chance you could concoct a test that would show the breakage that @niksy could work with to get an ideal solution? |
dalbitresb12
commented
May 11, 2021
I'm not sure if totally related (and I'm willing to open a separate issue if this is not related), but I've found that the parser also hangs indefinitely if this chunk of CSS is passed: .leaflet-oldie .leaflet-popup-tip {
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
}The previous CSS block was modified from here. I've found this bug while trying to use postcss-values-parser/lib/ValuesParser.js Lines 114 to 117 in 0357c82 The script I used to test it was this one: constpostcss=require('postcss');constpostcssEnvFunction=require('postcss-env-function');constplugins=[postcssEnvFunction()];constcss=`.leaflet-oldie .leaflet-popup-tip { filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);}`;postcss(plugins).process(css).then(result=>{console.log(result.css);});This will also hang the parser (in the same while loop as before): const{ parse }=require('postcss-values-parser');constcss='progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)';constast=parse(css);console.log(ast.toString());As I said, I'm not sure if this issue is related to the one this PR tries to address. If it is not related, I can open another issue. |
shellscape
commented
May 11, 2021
@jonathantneal checking back in on my last comment. Is that something you're able to do? If not, we can merge this as-is. |
jonathantneal
commented
May 11, 2021
Patching |
If function contains dot inside it’s name, parser hangs indefinitely (similar to #112). This is possible if Sass Modules namespace is used.
I don’t know if this should be fixed by default or we should add new option where we allow specific symbols for function names (similar to
interpolationoption).This PR contains:
Breaking Changes?