I fixed a small bug in CleverCss.
When I run:
clevercss.convert('''body:
color: $color
''',{'color':'#eee'})
I get:
EvalException: variable color is not defined (line 2)
expected was:
body {
color: #eeeeee;
}
My fix (on the evaluate method of class Engine) looks like this:
@@ -585,7 +585,8 @@
def evaluate(self, context=None):
"""Evaluate code."""
expr = None
- context = {}
+ if not isinstance(context, dict):
+ context = {}
for key, value in context.iteritems():
expr = self._parser.parse_expr(1, value)
context[key] = expr
I made the diff on the basis of clevercss.py April 20, 2009 at
git://github.com/dziegler/clevercss.git
regards Lasse
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pocoo-libs?hl=en
-~----------~----~----~----~------~----~------~--~---