added option to trim trailing whitespace on save