Method: IsoDoc::Function::Utils#get_note_container_id
- Defined in:
- lib/isodoc/function/utils.rb
#get_note_container_id(node, type) ⇒ Object
no recursion on references
101 102 103 104 105 106 107 |
# File 'lib/isodoc/function/utils.rb', line 101 def get_note_container_id(node, type) xpath = NOTE_CONTAINER_ANCESTOR.dup %w(figure table example).include?(type) and xpath.sub!(%r[ or local-name\(\) = '#{type}'], "") container = node.xpath(xpath) container&.last&.text || nil end |