diff --git a/lib/haml/buffer.rb b/lib/haml/buffer.rb index 04531e80..40be89c6 100644 --- a/lib/haml/buffer.rb +++ b/lib/haml/buffer.rb @@ -115,7 +115,7 @@ module Haml # that can then be merged with another attributes hash. def parse_class_and_id(list) attributes = {} - list.scan(/([#.])([-a-zA-Z_()]+)/) do |type, property| + list.scan(/([#.])([-_a-zA-Z0-9]+)/) do |type, property| case type when '.' if attributes[:class] diff --git a/test/results/tag_parsing.xhtml b/test/results/tag_parsing.xhtml index c32373af..c1d694c4 100644 --- a/test/results/tag_parsing.xhtml +++ b/test/results/tag_parsing.xhtml @@ -18,9 +18,9 @@