summaryrefslogtreecommitdiff
path: root/cli/rt/02_console.js
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2020-09-24 02:10:35 +0800
committerGitHub <noreply@github.com>2020-09-23 14:10:35 -0400
commite1b61d6794facf2d8da4d13273685dc0a5248aed (patch)
tree2e0d1bc091c56e2c04305d3e09f230dc33fd8260 /cli/rt/02_console.js
parent3ac9f1e209c3bb10cbb3c0a49077877a5bc5e2eb (diff)
fix(cli/console): quote non-alphanumeric symbols (#7641)
This quotes and escapes symbol descriptions that contains characters outside of the basic alpha-numeric identifier range.
Diffstat (limited to 'cli/rt/02_console.js')
-rw-r--r--cli/rt/02_console.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/rt/02_console.js b/cli/rt/02_console.js
index ae17d4199..0b5931616 100644
--- a/cli/rt/02_console.js
+++ b/cli/rt/02_console.js
@@ -414,7 +414,7 @@
case "undefined": // undefined is dim
return dim(String(value));
case "symbol": // Symbols are green
- return green(String(value));
+ return green(maybeQuoteSymbol(value));
case "bigint": // Bigints are yellow
return yellow(`${value}n`);
case "function": // Function string is cyan