class Kramdown::Parser::Kramdown

def parse_attribute_list(str, opts)

+opts+.
Parse the string +str+ and extract all attributes and add all found attributes to the hash
def parse_attribute_list(str, opts)
  str.scan(ALD_TYPE_ANY).each do |key, sep, val, id_attr, class_attr, ref|
    if ref
      (opts[:refs] ||= []) << ref
    elsif class_attr
      opts['class'] = ((opts['class'] || '') + " #{class_attr}").lstrip
    elsif id_attr
      opts['id'] = id_attr
    else
      opts[key] = val.gsub(/\\(\}|#{sep})/, "\\1")
    end
  end
end