remove leading space in ascii preview, because some dimwit wants to use spaces in the beginning of his files...

This commit is contained in:
Dominik Demuth 2023-11-07 17:07:47 +01:00
parent f956c111c2
commit a1691f11a6

View File

@ -46,7 +46,7 @@ class AsciiReader:
num_lines += len(self.header) num_lines += len(self.header)
with self.fname.open('r') as f: with self.fname.open('r') as f:
for i, line in enumerate(islice(f, len(self.header)+len(self.lines), num_lines)): for i, line in enumerate(islice(f, len(self.header)+len(self.lines), num_lines)):
line = line.rstrip('\n\t\r, ') line = line.strip('\n\t\r, ')
line = re.sub(r'[\t ;,] *', ';', line) line = re.sub(r'[\t ;,] *', ';', line)
line = line.split(';') line = line.split(';')