diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-11-15 00:42:14 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-11-15 00:42:14 +0100 |
commit | d36e4d72f1c08b4165f4e8140462688669d2fe94 (patch) | |
tree | c9a76fd4d4aeb403453a751431281c2e05844954 | |
parent | 4d2c2725385b7f929ba33015888ec10aaa81edbb (diff) | |
download | friedrich-d36e4d72f1c08b4165f4e8140462688669d2fe94.tar.gz |
Show hyphen-minus used as minus as mathematical minus in client.
-rw-r--r-- | play.js | 2 | ||||
-rw-r--r-- | rules.js | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -1093,6 +1093,7 @@ function colorize(text) { text = text.replaceAll("\u2663", colorize_C) text = text.replaceAll("\u2665", colorize_H) text = text.replaceAll("\u2666", colorize_D) + text = text.replace(/-( ?\d)/g, "\u2212$1") return text } @@ -1471,6 +1472,7 @@ function on_log(text) { text = colorize(text) text = text.replace(/S(\d+)/g, sub_space) text = text.replace(/P(\d+)/g, sub_piece) + text = text.replace(/-( ?\d)/g, "\u2212$1") if (text.startsWith("@")) { p.className = "move_tip" @@ -2332,7 +2332,7 @@ function signed_number(v) { if (v > 0) return "+" + v if (v < 0) - return "\u2212" + (-v) + return "-" + (-v) return "0" } |