diff --git a/lib/haml/parser.rb b/lib/haml/parser.rb index 939ca2d2..dd2bbb7a 100644 --- a/lib/haml/parser.rb +++ b/lib/haml/parser.rb @@ -555,7 +555,7 @@ module Haml attributes = {} return attributes if list.empty? - list.scan(/([#.])([-:_a-zA-Z0-9@]+)/) do |type, property| + list.scan(/([#.])([-:_a-zA-Z0-9\@]+)/) do |type, property| case type when '.' if attributes[CLASS_KEY] @@ -594,7 +594,7 @@ module Haml # Parses a line into tag_name, attributes, attributes_hash, object_ref, action, value def parse_tag(text) - match = text.scan(/%([-:\w]+)([-:\w.#@]*)(.+)?/)[0] + match = text.scan(/%([-:\w]+)([-:\w.#\@]*)(.+)?/)[0] raise SyntaxError.new(Error.message(:invalid_tag, text)) unless match tag_name, attributes, rest = match