Method: IsoDoc::Function::Inline#eref_target
- Defined in:
- lib/isodoc/function/inline.rb
#eref_target(node) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/isodoc/function/inline.rb', line 43 def eref_target(node) href = "##{node['bibitemid']}" url = node.at(ns("//bibitem[@id = '#{node['bibitemid']}']/"\ "uri[@type = 'citation']")) return href unless url href = suffix_url(url.text) anchor = node&.at(ns(".//locality[@type = 'anchor']"))&.text&.strip anchor and href += "##{anchor}" href end |