diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gendata.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/gendata.js b/tools/gendata.js index 5e4891b..548d9b0 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -62,6 +62,10 @@ function flush_scenario_html() { result = [] } +function nbsp_target(target) { + return target.split(", ").map(x=>x.replaceAll(" ", "\xa0")).join(", ") +} + for (let c of card_records) { if (!c.number) { allcards.push(`</div><h1>${c.scenario}</h1><div class="list">`) @@ -202,7 +206,7 @@ for (let c of card_records) { else html.push(`<div class="action_type">${c.action1_type}</div>`) html.push(`<div class="action_requirement">${c.action1_req}</div>`) - html.push(`<div class="action_target">${c.action1_target}</div>`) + html.push(`<div class="action_target">${nbsp_target(c.action1_target)}</div>`) if (c.action1_effect) { if (c.rule_text_1 || squeeze) html.push(`<div class="action_effect short">${c.action1_effect}</div>`) @@ -226,7 +230,7 @@ for (let c of card_records) { else html.push(`<div class="action_type">${c.action2_type}</div>`) html.push(`<div class="action_requirement">${c.action2_req}</div>`) - html.push(`<div class="action_target">${c.action2_target}</div>`) + html.push(`<div class="action_target">${nbsp_target(c.action2_target)}</div>`) if (c.action2_effect) { if (c.rule_text_2 || squeeze) html.push(`<div class="action_effect short">${c.action2_effect}</div>`) |