skip comments in _fast_forward_over_blank_lines
@@ -18,6 +18,8 @@ def _fast_forward_over_blank_lines(f):
if not line:
is_eof = True
break
+ elif line.startswith("#"):
+ continue
elif len(line.strip()) > 0:
break
return line.strip(), is_eof
@@ -209,8 +211,6 @@ def read_buffer(f):
line, is_eof = _fast_forward_over_blank_lines(f)
if line == "":
continue
- elif line.startswith("#"):
- continue
elif line == "mesh3d":
break
else:
@@ -220,8 +220,6 @@ def read_buffer(f):
line, is_eof = _fast_forward_over_blank_lines(f)
if is_eof:
break
- if line.startswith("#"):
- continue
elif line == "dimension":
dimension = int(f.readline())
