# File lib/asciidoctor/converter/html5.rb, line 1025
    def inline_anchor node
      case node.type
      when :xref
        unless (text = node.text) || (text = node.attributes['path'])
          if AbstractNode === (ref = node.document.catalog[:refs][refid = node.attributes['refid']])
            text = ref.xreftext((@xrefstyle ||= node.document.attributes['xrefstyle'])) || %([#{refid}])
          else
            text = %([#{refid}])
          end
        end
        %(<a href="#{node.target}">#{text}</a>)
      when :ref
        %(<a id="#{node.id}"></a>)
      when :link
        attrs = node.id ? [%( id="#{node.id}")] : []
        if (role = node.role)
          attrs << %( class="#{role}")
        end
        attrs << %( title="#{node.attr 'title'}") if node.attr? 'title', nil, false
        attrs << %( target="#{window = node.attr 'window'}"#{window == '_blank' || (node.option? 'noopener') ? ' rel="noopener"' : ''}) if node.attr? 'window', nil, false
        %(<a href="#{node.target}"#{attrs.join}>#{node.text}</a>)
      when :bibref
        # NOTE technically node.text should be node.reftext, but subs have already been applied to text
        %(<a id="#{node.id}"></a>#{node.text})
      else
        warn %(asciidoctor: WARNING: unknown anchor type: #{node.type.inspect})
      end
    end