Class/Module Index [+]

Quicksearch

Asciidoctor::HTML5::InlineAnchorTemplate

Public Instance Methods

anchor(target, text, type, document, node) click to toggle source
# File lib/asciidoctor/backends/html5.rb, line 937
def anchor(target, text, type, document, node)
  case type
  when :xref
    text = document.references[:ids].fetch(target, "[#{target}]") if text.nil?
    %(<a href="##{target}">#{text}</a>)
  when :ref
    %(<a id="#{target}"></a>)
  when :link
    %(<a href="#{target}"#{(node.attr? 'role') ? " class=\"#{node.attr 'role'}\"" : nil}#{(node.attr? 'window') ? " target=\"#{node.attr 'window'}\"" : nil}>#{text}</a>)
  when :bibref
    %(<a id="#{target}"></a>[#{target}])
  end
end
result(node) click to toggle source
# File lib/asciidoctor/backends/html5.rb, line 951
def result(node)
  anchor(node.target, node.text, node.type, node.document, node)
end
template() click to toggle source
# File lib/asciidoctor/backends/html5.rb, line 955
def template
  :invoke_result
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.