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 CHANGED
@@ -1 +1 @@
1
- 3.0.3
1
+ 3.0.4
@@ -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)
@@ -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
- # There aren't really any plain-CSS single-character identifiers anyway.
120
- STATIC_VALUE = /(-?#{NMSTART}#{NMCHAR}+|#{STRING_NOINTERP}|\s(?!%)|#[a-f0-9]|[,%]|#{NUM}|\!important)+(?=[;}])/i
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
@@ -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)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 3
7
7
  - 0
8
- - 3
9
- version: 3.0.3
8
+ - 4
9
+ version: 3.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Nathan Weizenbaum