aboutsummaryrefslogtreecommitdiffstats
path: root/src/bbss
diff options
context:
space:
mode:
Diffstat (limited to 'src/bbss')
-rw-r--r--src/bbss/lists.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bbss/lists.py b/src/bbss/lists.py
index 5bcdddf..6fa757f 100644
--- a/src/bbss/lists.py
+++ b/src/bbss/lists.py
@@ -8,12 +8,15 @@ def parse_listfile(contents: str, ctor: Callable[[str, Optional[str]], T]) -> Li
acc = []
comment_acc = []
for line in contents.splitlines():
- if line.startswith("#"):
+ if not len(line):
continue
elif line.startswith("##"):
comment_acc.append(line[2:].strip())
+ elif line.startswith("#"):
+ continue
else:
acc.append(ctor(line, " ".join(comment_acc) if len(comment_acc) else None))
+ comment_acc = []
return acc
@dataclass(frozen=True)