1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Now can handle tags with numbers in them... like %h1

git-svn-id: svn://hamptoncatlin.com/haml/trunk@4 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
hcatlin 2006-07-02 02:10:54 +00:00
parent 9b9c0dd24b
commit b03cf78f5b

View file

@ -75,7 +75,7 @@ module HAML
end
def render_tag(line)
line.scan(/[%]([-_a-z]+)([-_a-z.\#]*)([=]?)([^\n]*)/).each do |tag_name, attributes, action, value|
line.scan(/[%]([-_a-z0-9]+)([-_a-z.\#]*)([=]?)([^\n]*)/).each do |tag_name, attributes, action, value|
val = template_eval(value)
attribute_hash = parse_attributes(attributes)
attribute_hash.merge!(val) && val = nil if val.class == Hash