Skip to content

Commit fb4bad0

Browse files
committed
Handle symbols in sandbox output
1 parent bcd4c47 commit fb4bad0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

html/css/ejs.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ blockquote footer:before {
320320
.cm-s-default .cm-comment {color: #740;}
321321
.cm-s-default .cm-string, .sandbox-output-string {color: #700;}
322322
.cm-s-default .cm-string-2 {color: #740;}
323-
.cm-s-default .cm-tag {color: #170;}
323+
.cm-s-default .cm-tag, .sandbox-output-symbol {color: #170;}
324324

325325
.CodeMirror {
326326
height: auto;

html/js/sandbox.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@
328328
if (typeof val == "boolean") return span("bool", String(val))
329329
if (typeof val == "number") return span("number", String(val))
330330
if (typeof val == "string") return span("string", JSON.stringify(val))
331+
if (typeof val == "symbol") return span("symbol", String(val))
331332
if (val == null) return span("null", String(val))
332333
if (Array.isArray(val)) return representArray(val, space)
333334
else return representObj(val, space)

0 commit comments

Comments
 (0)