aminembarki / cssjanus

Automatically exported from code.google.com/p/cssjanus
Apache License 2.0
0 stars 0 forks source link

Bug on :not() #22

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. http://cssjanus.commoner.com/
2. Paste /* @noflip */ .test:not(:first) { margin-right: -0.25em; margin-left: 
0.25em; }
3. Press "Run CSSJanus!" button

What is the expected output? What do you see instead?
/* @noflip */ .test:not(:first) { margin-right: -0.25em; margin-left: 0.25em; }

What version of the product are you using? On what operating system?
/* @noflip */ .test:not(:first) { margin-right: -0.25em; margin-right: 0.25em; }

Please provide any additional information below.
It is effected on Wikipedia CSS resource loader

Original issue reported on code.google.com by ebrami...@gmail.com on 17 Jul 2013 at 10:33

GoogleCodeExporter commented 9 years ago
The solution is modifying 
https://code.google.com/p/cssjanus/source/browse/trunk/cssjanus.py#65 to 
LOOKAHEAD_NOT_OPEN_BRACE = (r'(?!(?:%s|%s|%s|#|\:|\.|\,|\+|>|\(|\))*?{)' %

Original comment by ebrami...@gmail.com on 18 Jul 2013 at 6:57