fix an issue related to auto trailing spaces on save in idea and markdown