module Kramdown::Parser::Html::Parser
def parse_html_attributes(str, line = nil)
Parses the given string for HTML attributes and returns the resulting hash.
def parse_html_attributes(str, line = nil) attrs = Utils::OrderedHash.new str.scan(HTML_ATTRIBUTE_RE).each do |attr, sep, val| attr.downcase! if attrs.has_key?(attr) warning("Duplicate HTML attribute '#{attr}' on line #{line || '?'} - overwriting previous one") end attrs[attr] = val || "" end attrs end