mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Haml] Fix a Ruby 1.9 error in parsing new attributes.
This commit is contained in:
parent
b5d49b339a
commit
de2f26640e
1 changed files with 4 additions and 1 deletions
|
@ -571,7 +571,10 @@ END
|
|||
attributes = {}
|
||||
|
||||
scanner.scan(/\(\s*/)
|
||||
until (name, value = parse_new_attribute(scanner)).first.nil?
|
||||
loop do
|
||||
name, value = parse_new_attribute(scanner)
|
||||
break if name.nil?
|
||||
|
||||
if name == false
|
||||
text = (Haml::Shared.balance(line, ?(, ?)) || [line]).first
|
||||
raise Haml::SyntaxError.new("Invalid attribute list: #{text.inspect}.", last_line - 1)
|
||||
|
|
Loading…
Add table
Reference in a new issue