From a1691f11a65a1bef45399523881f9b52cd26c555 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Tue, 7 Nov 2023 17:07:47 +0100 Subject: [PATCH] remove leading space in ascii preview, because some dimwit wants to use spaces in the beginning of his files... --- src/nmreval/io/asciireader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nmreval/io/asciireader.py b/src/nmreval/io/asciireader.py index afed5d8..6f48fec 100644 --- a/src/nmreval/io/asciireader.py +++ b/src/nmreval/io/asciireader.py @@ -46,7 +46,7 @@ class AsciiReader: num_lines += len(self.header) with self.fname.open('r') as f: 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 = line.split(';')