class Asciidoctor::AbstractNode

def icon_uri name

Returns A String reference or data URI for an icon image

name - The String name of the icon

The return value of this method can be safely used in an image tag.

safely converted to a data URI.
the 'data-uri' attribute is set on the document, the image will be
The target image path is then passed through the #image_uri() method. If

(defaulting to 'png').
attribute, the icon name, and the value of the 'icontype' attribute
construct a target image path by concatenating the value of the 'iconsdir'
value of this attribute is used as the target image path. Otherwise,
If the 'icon' attribute is set on this block, the name is ignored and the

specified icon name.
Public: Construct a reference or data URI to an icon image for the
def icon_uri name
  if attr? 'icon'
    icon = attr 'icon'
    # QUESTION should we be adding the extension if the icon is an absolute URI?
    icon = %(#{icon}.#{@document.attr 'icontype', 'png'}) unless Helpers.extname? icon
  else
    icon = %(#{name}.#{@document.attr 'icontype', 'png'})
  end
  image_uri icon, 'iconsdir'
end