1
0
Fork 0
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:
Nathan Weizenbaum 2009-07-12 12:12:58 -04:00
parent b5d49b339a
commit de2f26640e

View file

@ -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)