diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-12-17 17:47:14 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-01-08 16:36:48 +0100 |
commit | f269ad25fba3be1af57631df9aa964665e7e2308 (patch) | |
tree | df2b6f12a5590812c18d0301a0d43d6d8a92c320 /tools/gendata.js | |
parent | 3a564d1ecff1bb68d7646fd0fd427ca775c7924d (diff) | |
download | table-battles-f269ad25fba3be1af57631df9aa964665e7e2308.tar.gz |
Polish.
Diffstat (limited to 'tools/gendata.js')
-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>`) |