From e21e42e832e4ac633a9d48f6e30c34a9011008bc Mon Sep 17 00:00:00 2001 From: alyx Date: Sat, 25 Nov 2023 22:31:49 -0500 Subject: Main interface done. Up next: docs, logging, and polish --- src/bbss/lists.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/bbss/lists.py') 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) -- cgit v1.2.3-54-g00ecf