Method: IsoDoc::WordFunction::Comments#comment_attributes

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

#comment_attributes(docxml, span) ⇒ Object



81
82
83
84
85
86
87
88
# File 'lib/isodoc/word_function/comments.rb', line 81

def comment_attributes(docxml, span)
  fromlink = docxml.at("//*[@id='#{span['from']}']")
  return(nil) if fromlink.nil?

  tolink = docxml.at("//*[@id='#{span['to']}']") || fromlink
  target = docxml.at("//*[@id='#{span['target']}']")
  { from: fromlink, to: tolink, target: target }
end