diff options
Diffstat (limited to 'docs/repl.js')
| -rw-r--r-- | docs/repl.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/repl.js b/docs/repl.js index ec79324f..40eb6c4f 100644 --- a/docs/repl.js +++ b/docs/repl.js @@ -26,9 +26,11 @@ let repl = ()=>{ setcount(s); setTimeout(() => { try { + let out=[]; sysvals.show = (x,w) => { out.push(x); return x; } let c=compile(src,rt_sys); setExplain(src,c); - doc.rslt.textContent=fmt(run.apply(null,c)); + out.push(run.apply(null,c)); + doc.rslt.textContent=out.map(fmt).join('\n'); } catch(e) { doc.rslt.classList.add('err'); doc.rslt.textContent=fmtErr(src,e); |
