From aad5c0dfcec0e4eeefacb4bccce30e514d98b98c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 6 Jan 2025 22:05:09 +0100 Subject: use mathematical minus in log --- play.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/play.js b/play.js index 33220a5..fdc22f6 100644 --- a/play.js +++ b/play.js @@ -987,6 +987,10 @@ function sub_die(match) { return die[match] || match } +function sub_minus(match) { + return "\u2012" + match.substring(1) +} + function sub_icon(match) { return ICONS[match] || match } @@ -1051,6 +1055,7 @@ function on_log(text, ix) { text = text.replace(/V(\d+)/g, sub_power_card_value) text = text.replace(/%(\d+)/g, sub_space_name) text = text.replace(/D[1-6]/g, sub_die) + text = text.replace(/-\d/g, sub_minus) text = text.replace(/£[CDU][CU]\b/g, sub_icon) text = text.replace(/\.cT(\d+)/g, sub_icon) text = text.replace(/\.dT(\d+)/g, sub_icon) -- cgit v1.2.3