From f269ad25fba3be1af57631df9aa964665e7e2308 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 17 Dec 2023 17:47:14 +0100 Subject: Polish. --- tools/gendata.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tools') 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(`

${c.scenario}

`) @@ -202,7 +206,7 @@ for (let c of card_records) { else html.push(`
${c.action1_type}
`) html.push(`
${c.action1_req}
`) - html.push(`
${c.action1_target}
`) + html.push(`
${nbsp_target(c.action1_target)}
`) if (c.action1_effect) { if (c.rule_text_1 || squeeze) html.push(`
${c.action1_effect}
`) @@ -226,7 +230,7 @@ for (let c of card_records) { else html.push(`
${c.action2_type}
`) html.push(`
${c.action2_req}
`) - html.push(`
${c.action2_target}
`) + html.push(`
${nbsp_target(c.action2_target)}
`) if (c.action2_effect) { if (c.rule_text_2 || squeeze) html.push(`
${c.action2_effect}
`) -- cgit v1.2.3