mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Sass] Fix a bizarre parser error with SCSS and interpolation.
This commit is contained in:
parent
89c9c8a44f
commit
dbccadba45
2 changed files with 17 additions and 2 deletions
|
@ -149,10 +149,10 @@ module Sass
|
|||
# @return [Boolean]
|
||||
def whitespace?(tok = @tok)
|
||||
if tok
|
||||
@scanner.string[0...tok.pos] =~ /\s$/
|
||||
@scanner.string[0...tok.pos] =~ /\s\Z/
|
||||
else
|
||||
@scanner.string[@scanner.pos, 1] =~ /^\s/ ||
|
||||
@scanner.string[@scanner.pos - 1, 1] =~ /\s$/
|
||||
@scanner.string[@scanner.pos - 1, 1] =~ /\s\Z/
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -970,6 +970,21 @@ SCSS
|
|||
flim {
|
||||
&& {a: b}
|
||||
}
|
||||
SCSS
|
||||
end
|
||||
|
||||
# Regression
|
||||
|
||||
def test_weird_added_space
|
||||
assert_equal <<CSS, render(<<SCSS)
|
||||
foo {
|
||||
bar: -moz-bip; }
|
||||
CSS
|
||||
$value : bip;
|
||||
|
||||
foo {
|
||||
bar: -moz-\#{$value};
|
||||
}
|
||||
SCSS
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue