DiffIterable () { for (Range range : myIterable.iterateChanges()) { // match spaces if we can, ignore them if we can't Range expanded = expandWhitespaces(myText1, myText2, range); Range trimmed = trim(myText1, myText2, expanded); if (!trimmed.isEmpty() && !isEqualsIgnoreWhitespaces(myText1, myText2, trimmed)) { myChanges.add(trimmed); } } return create(myChanges, myText1.length(), myText2.length()); }