def merge_name_and_attributes(name, attributes_hash = {})
      # skip merging if no ids or classes found in name
      return name, attributes_hash unless name =~ /^(.+?)?([\.#].*)$/

      return $1 || "div", AttributeBuilder.merge_attributes!(
        Haml::Parser.parse_class_and_id($2), attributes_hash)
    end
def merge_name_and_attributes(name, attributes_hash = {})
      # skip merging if no ids or classes found in name
      return name, attributes_hash unless name =~ /^(.+?)?([\.#].*)$/

      return $1 || "div", AttributeBuilder.merge_attributes!(
        Haml::Parser.parse_class_and_id($2), attributes_hash)
    end
Parses the tag name used for \{#haml\_tag}
 and merges it with the Ruby attributes hash.