trim line endings