Method: IsoDoc::WordFunction::Body#xref_parse

Defined in:
lib/isodoc/word_function/inline.rb

#xref_parse(node, out) ⇒ Object



59
60
61
62
63
64
65
66
67
68
# File 'lib/isodoc/word_function/inline.rb', line 59

def xref_parse(node, out)
  target = if /#/.match?(node["target"])
             node["target"].sub("#", ".doc#")
           else
             "##{node['target']}"
           end
  out.a(href: target) do |l|
    node.children.each { |n| parse(n, l) }
  end
end