Okay, thanks... Then I guess it's due to this: your selector is split into two different selectors ("something:(firstpart" and "secondpart)"), and then sorted to gain a few bytes at gzipping time, but this also moves "secondpart)" further up the chain instead of directly following it. Hence the broken part.
So, there are two ways of avoiding this...
1/ Just reverting my sort() call and calling it quits on the optimization.
2/ Protection quotes, double quotes, brackets and parenthesis before doing the parsing. That is, anything between these items would be base64-encoded or something (right before building the pseudo-XML CSS tree), and then decoded again once the actual CSS file is generated.
I have a neat preference for solution 2 because it's "cleaner" in my opinion, and would also be likely to fix other potential issues I haven't found yet.
However, I'm not 100% sure it's going to work flawlessly. I can't think of anything right now, but there may be occasions where Wedge will want to access stuff between protected bytes at tree parsing time... What do you think?
So, there are two ways of avoiding this...
1/ Just reverting my sort() call and calling it quits on the optimization.
2/ Protection quotes, double quotes, brackets and parenthesis before doing the parsing. That is, anything between these items would be base64-encoded or something (right before building the pseudo-XML CSS tree), and then decoded again once the actual CSS file is generated.
I have a neat preference for solution 2 because it's "cleaner" in my opinion, and would also be likely to fix other potential issues I haven't found yet.
However, I'm not 100% sure it's going to work flawlessly. I can't think of anything right now, but there may be occasions where Wedge will want to access stuff between protected bytes at tree parsing time... What do you think?




