# File lib/htmldiff.rb, line 227 def insert_tag(tagname, cssclass, words) loop do break if words.empty? non_tags = extract_consecutive_words(words) { |word| not tag?(word) } @content << wrap_text(non_tags.join, tagname, cssclass) unless non_tags.empty? break if words.empty? @content += extract_consecutive_words(words) { |word| tag?(word) } end end