class Kramdown::Parser::Kramdown
def add_link(el, href, title, alt_text = nil, ial = nil)
This helper methods adds the approriate attributes to the element +el+ of type +a+ or +img+
def add_link(el, href, title, alt_text = nil, ial = nil) el.options[:ial] = ial update_attr_with_ial(el.attr, ial) if ial if el.type == :a el.attr['href'] = href else el.attr['src'] = href el.attr['alt'] = alt_text el.children.clear end el.attr['title'] = title if title @tree.children << el end