added support for spaces that are inserted from Word and don't make sense to the text editor