From e1b61d6794facf2d8da4d13273685dc0a5248aed Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Thu, 24 Sep 2020 02:10:35 +0800 Subject: 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. --- cli/rt/02_console.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/rt') 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 -- cgit v1.2.3