Method: IsoDoc::WordFunction::Body#xref_parse

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

#xref_parse(node, out) ⇒ Object



46
47
48
49
50
51
52
53
54
55
# File 'lib/isodoc/word_function/inline.rb', line 46

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