class Kramdown::Converter::Html
def convert_standalone_image(el, indent)
Helper method used by +convert_p+ to convert a paragraph that only contains a single :img
def convert_standalone_image(el, indent) attr = el.attr.dup figure_attr = {} figure_attr['class'] = attr.delete('class') if attr.key?('class') figure_attr['id'] = attr.delete('id') if attr.key?('id') body = "#{' ' * (indent + @indent)}<img#{html_attributes(attr)} />\n" \ "#{' ' * (indent + @indent)}<figcaption>#{attr['alt']}</figcaption>\n" format_as_indented_block_html("figure", figure_attr, body, indent) end