Method: Metanorma::CollectionRenderer#update_indirect_refs_to_docs_anchor
- Defined in:
- lib/metanorma/collection_fileparse.rb
#update_indirect_refs_to_docs_anchor(eref, file) ⇒ Object
194 195 196 197 198 199 200 201 202 203 |
# File 'lib/metanorma/collection_fileparse.rb', line 194 def update_indirect_refs_to_docs_anchor(eref, file) a = eref.at(ns(".//locality[@type = 'anchor']/referenceFrom")) or return suffix = file @files.get(file) && p = @files.get(file, :parentid) and suffix = "#{p}_#{suffix}" existing = a.text anchor = Metanorma::Utils::to_ncname("#{existing}_#{suffix}") @updated_anchors[existing] or a.children = anchor @updated_anchors[anchor] = true end |