home · contact · privacy
Fix Collection printing of page separators.
authorPlom Heller <plom@plomlompom.com>
Fri, 24 Apr 2026 01:14:45 +0000 (03:14 +0200)
committerPlom Heller <plom@plomlompom.com>
Fri, 24 Apr 2026 01:14:45 +0000 (03:14 +0200)
bricksplom.py

index ce0b90c1169dcc46e32036bfee8b4dd403ab0c87..904951640c6c6f0ad5ef5a103417052e0753f02f 100755 (executable)
@@ -211,8 +211,7 @@ class Collection(Textfiled):
                 id_, description = cls.tokify(line, 2)
                 i_listings = [[[]]]
                 collected[id_] = description, i_listings
-                continue
-            if line[1:2] == CHAR_SEPARATOR_COLUMN:
+            elif line[1:2] == CHAR_SEPARATOR_COLUMN:
                 i_listings[-1] += [[]]
             elif line[1:2] == CHAR_SEPARATOR_PAGE:
                 i_listings += [[[]]]
@@ -240,7 +239,7 @@ class Collection(Textfiled):
                     lines += [f' {count:2} {piece_id:>7} {comment}']
                 columns += ['\n'.join(lines)]
             pages += ['\n -\n'.join(columns)]
-        return f'\n{self.id_} {self.description}\n' + ' =\n'.join(pages)
+        return f'\n{self.id_} {self.description}\n' + '\n =\n'.join(pages)
 
     def piece_listings_flat(self) -> tuple[PieceListing, ...]:
         'Flattened variant of .piece_listings, no division into pages/cols.'