class Kramdown::Element
def self.attrmangle(k)
explicit or automatic studlification
def self.attrmangle(k) if (d = k.gsub(/_(.|$)/) { $1.upcase }) != k or d = STUDLY_ATTR_MAP[k] d end end
def rfc2629_fix(opts)
def rfc2629_fix(opts) if a = attr if anchor = a.delete('id') a['anchor'] = ::Kramdown::Parser::RFC2629Kramdown.idref_cleanup(anchor) end if anchor = a.delete('href') a['target'] = ::Kramdown::Parser::RFC2629Kramdown.idref_cleanup(anchor) end if av = a.delete('noabbrev') # pseudo attribute -> opts opts = opts.merge(noabbrev: TRUTHY[av]) # updated copy end attr.keys.each do |k| if d = self.class.attrmangle(k) a[d] = a.delete(k) end end end opts end