trim trailing whitespace for indent