diff --git a/src/nmreval/io/asciireader.py b/src/nmreval/io/asciireader.py index 04fd19e..e2c0464 100644 --- a/src/nmreval/io/asciireader.py +++ b/src/nmreval/io/asciireader.py @@ -49,10 +49,8 @@ class AsciiReader: 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, ') - - is_empty = len(line) == 0 - line = re.split(r'[\s,;]', line) + try: comment_start = line.index('#') self.line_comment.append(' '.join(line[comment_start:])) @@ -60,6 +58,8 @@ class AsciiReader: except ValueError: self.line_comment.append('') + is_empty = len(line) == 0 + if not is_empty: self.width.append(len(line)) self.lines.append(line)