Method: #insert_comment_cont

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

#insert_comment_cont(from, to, target) ⇒ Object



108
109
110
111
112
113
114
115
116
117
118
# File 'lib/isodoc/wordconvert/comments.rb', line 108

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