tabs to spaces and trim whitespace