Remove trailing newlines from lines read from files.

The other forms of pipeable.input don't include trailing newlines,
so this makes read_files more consistent with the rest.
This commit is contained in:
voussoir 2020-12-07 20:23:14 -08:00
parent 62b44be0d5
commit 7969e38872

View file

@ -119,6 +119,7 @@ def input(
elif read_files and os.path.isfile(arg):
lines = open(arg, 'r', encoding='utf-8')
lines = (line.rstrip('\r\n') for line in lines)
else:
lines = arg.splitlines()