summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEevee (Alex Munroe) <eevee.git@veekun.com>2013-10-04 16:19:52 -0700
committerEevee (Alex Munroe) <eevee.git@veekun.com>2013-10-04 16:20:04 -0700
commite6ec63d3db24334dcc902027abfdf09c53cdaa51 (patch)
treebcf187713355283a4f9c7c3afb6015c4bd1431d8
parenta533edb1f345b4bed822ebec244ef95449a65986 (diff)
downloadpyscss-e6ec63d3db24334dcc902027abfdf09c53cdaa51.tar.gz
Correctly preserve commas in append().
-rw-r--r--scss/functions/core.py3
-rw-r--r--scss/tests/functions/test_core.py3
2 files changed, 5 insertions, 1 deletions
diff --git a/scss/functions/core.py b/scss/functions/core.py
index 422b505..9a68cc8 100644
--- a/scss/functions/core.py
+++ b/scss/functions/core.py
@@ -474,8 +474,9 @@ CORE_LIBRARY.add(Number.wrap_python_function(math.floor), 'floor', 1)
def __parse_separator(separator, default_from=None):
if separator is None:
- return None
+ separator = 'auto'
separator = String.unquoted(separator).value
+
if separator == 'comma':
return True
elif separator == 'space':
diff --git a/scss/tests/functions/test_core.py b/scss/tests/functions/test_core.py
index d6a8ed0..4b1e906 100644
--- a/scss/tests/functions/test_core.py
+++ b/scss/tests/functions/test_core.py
@@ -322,6 +322,9 @@ def test_append(calc):
assert calc('append(10px, 20px, comma)') == calc('10px, 20px')
assert calc('append((blue, red), green, space)') == calc('blue red green')
+ # TODO need to test for commas here
+ assert calc('append((a, b), c)') == calc('a, b, c')
+
def test_zip(calc):
# Examples from the Ruby docs