mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
More stuff for constant-as-operator handling. The constant !important is now by default the string "!important".
git-svn-id: svn://hamptoncatlin.com/haml/trunk@648 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
parent
61e5d0059e
commit
a9418b307c
4 changed files with 10 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -89,3 +89,9 @@
|
|||
:col
|
||||
:col= #5f6e7d % #10200a
|
||||
:num= #aaabac % 3
|
||||
|
||||
#const
|
||||
:escaped
|
||||
:quote = "!foo"
|
||||
:slash = \!foo
|
||||
:default = !str !important
|
||||
|
|
Loading…
Add table
Reference in a new issue