check for preceding whitespace on insertion