From 543e0139e327f31a84ac8fa0f159ef3a07186e21 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Thu, 2 Jan 2025 23:05:47 +0000 Subject: wrap icons --- play.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'play.js') diff --git a/play.js b/play.js index 2b087d1..0e15fb6 100644 --- a/play.js +++ b/play.js @@ -994,6 +994,11 @@ function sub_arrow(match) { return ' → ' } +function wrap_icons(match) { + return `${match}`; +} + + const ICONS = { '£CC': '', '£CU': '', @@ -1038,6 +1043,10 @@ function on_log(text, ix) { p.className = "i" } +/* + text = text.replace(/(\(£[CDU][CU]\s\.to\s£[CDU][CU]\))/g, wrap_icons) +*/ + text = text.replace(/_/g, " ") text = text.replace(/C(\d+)/g, sub_card_name) text = text.replace(/P(\d+)/g, sub_power_card_name) -- cgit v1.2.3