module Kramdown::Utils::Html

def html_attributes(attr)

Return the HTML representation of the attributes +attr+.
def html_attributes(attr)
  attr.map do |k, v|
    v.nil? || (k == 'id' && v.strip.empty?) ? '' : " #{k}=\"#{escape_html(v.to_s, :attribute)}\""
  end.join('')
end