aminembarki / cssjanus

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

Overspaced four-part rules are flipped without preserving whitespace or not flipped at all #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Overspaced four-part rules like this one:
    margin: 1px  4em        0    2px;
(that's two spaces, a tab, and four spaces)
get their whitespace collapsed to single spaces when flipped:
    margin: 1px 2px 0 4em;

Overspaced four-part color rules like this one:
    order-color: red  yellow       blue    green;
aren't even flipped at all.

See attachments for testcase, expected output and actual output.

The attached patch fixes both issues: it changes the regex for detecting 
four-part color rules to allow multiple whitespace characters between colors, 
and preserves whitespace when swapping both kinds of four-part rules.

Original issue reported on code.google.com by roan.kat...@gmail.com on 29 Jun 2010 at 3:43

Attachments: