diff options
author | Eevee (Alex Munroe) <eevee.git@veekun.com> | 2014-11-12 16:06:06 -0800 |
---|---|---|
committer | Eevee (Alex Munroe) <eevee.git@veekun.com> | 2014-11-12 16:06:06 -0800 |
commit | d4b2ad269b794a7f03210636d5cf333ea1470b76 (patch) | |
tree | 23f94f6ce32cae6c4bed16c36d3d6c192829cfc7 | |
parent | 018400aadd8fb770e7dd2293480147399fc58ed1 (diff) | |
download | pyscss-d4b2ad269b794a7f03210636d5cf333ea1470b76.tar.gz |
URLs with quotes should produce Url, not Function. Fixes #312.
-rw-r--r-- | scss/ast.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scss/ast.py b/scss/ast.py index 90cf76a..a8ab69b 100644 --- a/scss/ast.py +++ b/scss/ast.py @@ -29,6 +29,7 @@ from scss.types import Map from scss.types import Null from scss.types import String from scss.types import Undefined +from scss.types import Url from scss.types import Value from scss.util import normalize_var @@ -506,7 +507,14 @@ class FunctionLiteral(Expression): # TODO compress contents = child.render() quotes = None - return Function(contents, self.function_name, quotes=quotes) + + # TODO unclear if this is the right place for this logic, or if it + # should go in the Function constructor, or should be passed in + # explicitly by the grammar, or even if Url should go away entirely + if self.function_name == "url": + return Url(contents, quotes=quotes) + else: + return Function(contents, self.function_name, quotes=quotes) class AlphaFunctionLiteral(Expression): |