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