                   toRemove.push hl
                 else
                   # this range is is at the middle of the node
+#                  console.log "Gonna split @ " + range.start + "-" + index + " = " + (range.start - index) + " (len is: " + nextPart.data.length + ")"
                   middlePart = nextPart.splitText range.start - index
                   beforePart = middlePart.previousSibling
+#                  console.log "Gonna split @ " + range.end + "-" + range.start + "=" + (range.end - range.start) + " (len is: " + middlePart.data.length + ")"
                   nextPart = middlePart.splitText range.end - range.start
 #                  if middlePart.data isnt range.yields
 #                    console.log "Middle cut. Wanted: '" + range.yields + "'; got: '" + middlePart.data + "'."

            lastRange.end = range.end
#            console.log "Should have appended the yield value, too: '" + lastRange.yields + "'."
        else
          # no previous range, or it's too far off
          united.push lastRange =
            start: range.start
            end: range.end
            yields: range.yields
    united


  uniteRanges: (ranges) ->
    united = []
    delete lastRange
#    console.log "Uniting ranges: "
#    console.log ranges
    for range in ranges.sort @compareRanges
#        console.log "Doing range: "
#        console.log range
        if lastRange? and lastRange.end >= range.start
#          console.log "Can unite..."
          # there was a previous range, and we can continue it
          if range.end > lastRange.end
#            console.log "Old yields: '" + lastRange.yields + "'."
