stripping ending whitespace in source code