summaryrefslogtreecommitdiff
path: root/scss/expression.py
diff options
context:
space:
mode:
Diffstat (limited to 'scss/expression.py')
-rw-r--r--scss/expression.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scss/expression.py b/scss/expression.py
index cacd8ec..12c867a 100644
--- a/scss/expression.py
+++ b/scss/expression.py
@@ -36,7 +36,7 @@ class Calculator(object):
else:
self.namespace = namespace
- def _pound_substitute(self, result):
+ def _pound_substitute(self, result, unquote):
expr = result.group(1)
value = self.evaluate_expression(expr)
@@ -45,9 +45,9 @@ class Calculator(object):
elif value.is_null:
return ""
else:
- return dequote(value.render())
+ return dequote(value.render(unquote=unquote))
- def do_glob_math(self, cont):
+ def do_glob_math(self, cont, unquote=False):
"""Performs #{}-interpolation. The result is always treated as a fixed
syntactic unit and will not be re-evaluated.
"""
@@ -55,7 +55,7 @@ class Calculator(object):
cont = str(cont)
if '#{' not in cont:
return cont
- cont = _expr_glob_re.sub(self._pound_substitute, cont)
+ cont = _expr_glob_re.sub(lambda r: self._pound_substitute(r, unquote), cont)
return cont
def apply_vars(self, cont):