From the Codex review of #212 (follows #218).
Where: scripts/fleet/card_markup.py.
- A crash:
FIGURE accepts [\d,]+, so <div class="num"><b>,</b> parses and then int("") raises ValueError. Through main(), no rows print at all.
- An escape: a second tile such as
<div class="num"><b>7 </b></div> doesn't match FIGURE, because of the trailing space. markup_problems() doesn't count it, the check passes, and assemble() renders both tiles.
Fix: count the headline tiles themselves (<div class="num">), requiring exactly one per card and none outside the cards. Read the figure only from a tile that starts with a digit, and report anything else as MARKUP.
From the Codex review of #212 (follows #218).
Where:
scripts/fleet/card_markup.py.FIGUREaccepts[\d,]+, so<div class="num"><b>,</b>parses and thenint("")raises ValueError. Throughmain(), no rows print at all.<div class="num"><b>7 </b></div>doesn't matchFIGURE, because of the trailing space.markup_problems()doesn't count it, the check passes, andassemble()renders both tiles.Fix: count the headline tiles themselves (
<div class="num">), requiring exactly one per card and none outside the cards. Read the figure only from a tile that starts with a digit, and report anything else as MARKUP.