Method: IsoDoc::WordFunction::Comments#insert_comment_cont

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

#insert_comment_cont(from, upto, target) ⇒ Object



105
106
107
108
109
110
111
112
113
114
115
# File 'lib/isodoc/word_function/comments.rb', line 105

def insert_comment_cont(from, upto, target)
  # includes_to = from.at(".//*[@id='#{upto}']")
  while !from.nil? && from["id"] != upto
    following = from.xpath("./following::*")
    (from = following.shift) && incl_to = from.at(".//*[@id='#{upto}']")
    while !incl_to.nil? && !from.nil? && skip_comment_wrap(from)
      (from = following.shift) && incl_to = from.at(".//*[@id='#{upto}']")
    end
    wrap_comment_cont(from, target) if !from.nil?
  end
end