nightwish65 / cssjanus

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

Classnames separated by comma, newline aren't exempted from RTLification #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
Added as comment to Issue 4. But can't seem to delete this one.

Original comment by SilvanT...@gmail.com on 24 Oct 2008 at 1:14

GoogleCodeExporter commented 9 years ago

Original comment by els...@gmail.com on 1 Jul 2009 at 12:15