haml 3.0.3 → 3.0.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of haml might be problematic. Click here for more details.
- data/VERSION +1 -1
- data/lib/sass/script/parser.rb +2 -1
- data/lib/sass/scss/rx.rb +2 -2
- data/test/sass/script_test.rb +5 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.4
|
data/lib/sass/script/parser.rb
CHANGED
@@ -265,7 +265,7 @@ RUBY
|
|
265
265
|
def fn_arglist
|
266
266
|
return unless e = equals
|
267
267
|
return [e] unless try_tok(:comma)
|
268
|
-
[e, *fn_arglist]
|
268
|
+
[e, *assert_expr(:fn_arglist)]
|
269
269
|
end
|
270
270
|
|
271
271
|
def arglist
|
@@ -334,6 +334,7 @@ RUBY
|
|
334
334
|
:string => "string",
|
335
335
|
:default => "expression (e.g. 1px, bold)",
|
336
336
|
:arglist => "mixin argument",
|
337
|
+
:fn_arglist => "function argument",
|
337
338
|
}
|
338
339
|
|
339
340
|
def assert_expr(name)
|
data/lib/sass/scss/rx.rb
CHANGED
@@ -116,8 +116,8 @@ module Sass
|
|
116
116
|
# Can't use IDENT here, because it seems to take exponential time on 1.8.
|
117
117
|
# We could use it for 1.9 only, but I don't want to introduce a cross-version
|
118
118
|
# behavior difference.
|
119
|
-
#
|
120
|
-
STATIC_VALUE = /(-?#{NMSTART}
|
119
|
+
# In any case, almost all CSS idents will be matched by this.
|
120
|
+
STATIC_VALUE = /(-?#{NMSTART}|#{STRING_NOINTERP}|\s(?!%)|#[a-f0-9]|[,%]|#{NUM}|\!important)+(?=[;}])/i
|
121
121
|
|
122
122
|
STATIC_SELECTOR = /(#{NMCHAR}|\s|[,>+*]|[:#.]#{NMSTART})+(?=[{])/i
|
123
123
|
end
|
data/test/sass/script_test.rb
CHANGED
@@ -329,6 +329,11 @@ SASS
|
|
329
329
|
assert_equal "#2", resolve('"##{1 + 1}"')
|
330
330
|
end
|
331
331
|
|
332
|
+
def test_misplaced_comma_in_funcall
|
333
|
+
assert_raise(Sass::SyntaxError,
|
334
|
+
'Invalid CSS after "foo(bar, ": expected function argument, was ")"') {eval('foo(bar, )')}
|
335
|
+
end
|
336
|
+
|
332
337
|
private
|
333
338
|
|
334
339
|
def resolve(str, opts = {}, environment = env)
|