It would be nice to get this fixed, but changing the class names is also
obviously an option. Just in caseClasses separated by a comma and linebreak
are flipped when they shouldn’t be. This doesn’t work in
http://cssjanus.commoner.com/ or when passing a css file to cssjanus on stdin.
Here's the sample:
.my_content .left_column .box .box_1,
.my_content .left_column .box .box_2 {
padding-right: 0px;
padding-left: 8px;
width: 191px;
}
CSS Janus returns:
.my_content .right_column .box .box_1,
.my_content .left_column .box .box_2 {
padding-left: 0px;
padding-right: 8px;
width: 191px;
}
I added a test case to report this (see below), but it passed. I think it
has something to do with the newline parsing.
--- a/www/scripts/cssjanus/cssjanus_test.py
+++ b/www/scripts/cssjanus/cssjanus_test.py
@@ -443,6 +443,12 @@ class CSSJANUSUnitTest(unittest.TestCase):
shouldbe = ['div.left > span.right+span.left { float: right }']
self.assertEqual(shouldbe, cssjanus.ChangeLeftToRightToLeft(testcase))
+ testcase = [""".my_content .left_column .box .box_1,"""
+ """.my_content .left_column .box .box_2 {\npadding-right:
0px;\npadding-left: 8px;\
+ shouldbe = [""".my_content .left_column .box .box_1,"""
+ """.my_content .left_column .box .box_2 {\npadding-left:
0px;\npadding-right: 8px;\
+ self.assertEqual(shouldbe, cssjanus.ChangeLeftToRightToLeft(testcase))
+
def testLongLineWithMultipleDefs(self):
testcase = ['body{direction:rtl;float:right}'
'.b2{direction:ltr;float:right}']
Original issue reported on code.google.com by SilvanT...@gmail.com on 24 Oct 2008 at 1:12
Original issue reported on code.google.com by
SilvanT...@gmail.com
on 24 Oct 2008 at 1:12