Editor: add whitespace correction before calculating diff