diff --git a/lib/sass/constant.rb b/lib/sass/constant.rb index 790cda37..8c7ab5f8 100644 --- a/lib/sass/constant.rb +++ b/lib/sass/constant.rb @@ -101,7 +101,7 @@ module Sass symbol = SYMBOLS[byte] # Adjacent values without an operator should be concatenated - if (symbol.nil? || symbol == :open) && + if (symbol.nil? || symbol == :open || symbol == :const) && last && (!last.is_a?(Symbol) || last == :close) to_return << :concat end diff --git a/lib/sass/engine.rb b/lib/sass/engine.rb index f1ef400e..c620dc2d 100644 --- a/lib/sass/engine.rb +++ b/lib/sass/engine.rb @@ -70,7 +70,7 @@ module Sass }.merge! options @template = template.split(/\n\r|\n/) @lines = [] - @constants = {} + @constants = {"important" => "!important"} end # Processes the template and returns the result as a string. diff --git a/test/sass/results/constants.css b/test/sass/results/constants.css index 96c77ee7..1aa6d919 100644 --- a/test/sass/results/constants.css +++ b/test/sass/results/constants.css @@ -10,3 +10,5 @@ #div { num-num: 3.33333333333333; num-num2: 3; col-num: #092345; col-col: #0b0d0f; } #mod { num-num: 2; col-col: #0f0e05; col-num: #020001; } + +#const { escaped-quote: !foo; escaped-slash: !foo; default: Hello! !important; } diff --git a/test/sass/templates/constants.sass b/test/sass/templates/constants.sass index 1b8bf2a8..6ae38b46 100644 --- a/test/sass/templates/constants.sass +++ b/test/sass/templates/constants.sass @@ -89,3 +89,9 @@ :col :col= #5f6e7d % #10200a :num= #aaabac % 3 + +#const + :escaped + :quote = "!foo" + :slash = \!foo + :default = !str !important