This repository was archived by the owner on Apr 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
Gracefully handle empty custom properties #63
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Empty custom properties like --foo:;
should produce syntax errors, but currently Ruby Sass throws:
/home/nweiz/code/sass/lib/sass/util.rb:159:in `merge_adjacent_strings': undefined method `size' for nil:NilClass (NoMethodError)
from /home/nweiz/code/sass/lib/sass/tree/prop_node.rb:73:in `initialize'
from /home/nweiz/code/sass/lib/sass/scss/parser.rb:837:in `new'
from /home/nweiz/code/sass/lib/sass/scss/parser.rb:837:in `css_variable_declaration'
from /home/nweiz/code/sass/lib/sass/scss/parser.rb:785:in `try_declaration'
from /home/nweiz/code/sass/lib/sass/scss/parser.rb:732:in `declaration_or_ruleset'
from /home/nweiz/code/sass/lib/sass/scss/parser.rb:697:in `block_child'
from /home/nweiz/code/sass/lib/sass/scss/parser.rb:686:in `block_contents'
from /home/nweiz/code/sass/lib/sass/scss/parser.rb:678:in `block'
from /home/nweiz/code/sass/lib/sass/scss/parser.rb:670:in `ruleset'
from /home/nweiz/code/sass/lib/sass/scss/parser.rb:696:in `block_child'
from /home/nweiz/code/sass/lib/sass/scss/parser.rb:686:in `block_contents'
from /home/nweiz/code/sass/lib/sass/scss/parser.rb:137:in `stylesheet'
from /home/nweiz/code/sass/lib/sass/scss/parser.rb:41:in `parse'
from /home/nweiz/code/sass/lib/sass/engine.rb:414:in `_to_tree'
from /home/nweiz/code/sass/lib/sass/engine.rb:290:in `render'
from /home/nweiz/code/sass/lib/sass/exec/sass_scss.rb:400:in `run'
from /home/nweiz/code/sass/lib/sass/exec/sass_scss.rb:63:in `process_result'
from /home/nweiz/code/sass/lib/sass/exec/base.rb:52:in `parse'
from /home/nweiz/code/sass/lib/sass/exec/base.rb:19:in `parse!'
from /home/nweiz/code/sass/bin/sass:13:in `<main>'
Also, empty interpolated custom properties like --foo:#{""}
should throw an error but Ruby Sass currently emits them as-is.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working