MikeBeller / janet-playground

A WebAssembly based playground for Janet a la play.golang.org
MIT License
9 stars 2 forks source link

Janet-playground does not print certain types? #1

Closed MikeBeller closed 3 years ago

MikeBeller commented 3 years ago

Identified by @yumaikas

(string/find "foo" [1 2 3])

Should print:

error: bad slot #1, expected string|symbol|keyword|buffer, got <tuple 0x556FAE9A6FC0>
  in string/find
  in _thunk [repl] (tailcall) on line 1, column 1

But in janet-playground it prints:

error: bad slot #1, expected string|symbol|keyword|buffer, got
in string/find
in _thunk [playground] on line 1, column 1
"bad slot #1, expected string|symbol|keyword|buffer, got "
ERROREXIT: 1

In other words, the <tuple ...> doesn't print.

MikeBeller commented 3 years ago

Problem was failure to htmlEscape the output. Fixed in commit f3a5be7cd4469ee18b48185fabeb052579105c98