Closed eevee closed 10 years ago
Is it sufficient to change these lines within scss.types.List.render
:
return delim.join(
item.render(compress=compress)
for item in self.value
)
into:
return delim.join(
item.render(compress=compress)
for item in self.value
if not isinstance(item, Null) and len(item)
)
No, the parser needs to be made aware of this too.
So out of "I just really need this to work now"-desperation, I ended up adding a (terrible, inexcusable) monkey-patch for the above code (except using if item.value != "()"
as the guard). I also set a __version__
check to remind me to get rid of it in 1.3+. It does seem to fix my immediate problem (linear-gradient
not working in bourbon).
I understand this is not a complete solution... but is it just a matter of it missing certain instances (I'm still seeing ()
s, but nothing that affects me so far) or am I likely to have broken something more subtle?
Any code that tries to treat ()
as a list (e.g. append((), $value)
to get a one-element list) will be a little confused, because the parser still thinks ()
is a string. But that's uncommon in my experience, so if it fixes the problem for you, it's probably fine :)
I accidentally fixed this! Neat.
From ye Ruby reference:
That last part isn't handled correctly, either.