aboutsummaryrefslogtreecommitdiff
path: root/docs/try.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-08-14 13:47:14 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-08-14 13:53:18 -0400
commit85e686623d4fe964c1be84fb08df860aab017407 (patch)
treebf1ea016aa31694e96c3c33a98c0d7377e0dd9e3 /docs/try.html
parent47c9f4230e059074d50a71cff4d8c1d077dbc4c4 (diff)
Add a formatter to bqn.js
Diffstat (limited to 'docs/try.html')
-rw-r--r--docs/try.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/try.html b/docs/try.html
index 23d5700e..6d10ad2a 100644
--- a/docs/try.html
+++ b/docs/try.html
@@ -9,7 +9,7 @@
#code { width:100%; outline:none; }
#run, #perm { float:right; }
.cont { margin:1.3em 0; }
- #rslt { white-space:pre; }
+ #rslt { border:none; background:none; }
#rslt.err { color:#d11; }
#kb { line-height:1.5; width:100%; padding:0.3em 0; background:inherit; }
#kb span { cursor:default; padding:1px; }
@@ -29,7 +29,7 @@
<textarea id="code" class="bqn" rows="8" autofocus></textarea>
<input id="run" type="submit" value="Run (or shift-enter)">
</div>
- <div id="rslt"></div>
+ <pre id="rslt"></pre>
<script src="bqn.js"></script>
<script>
@@ -40,7 +40,7 @@ let repl = ()=>{
try {
let s=doc.code.value;
doc.rslt.classList.remove('err');
- doc.rslt.textContent=""+bqn(s);
+ doc.rslt.textContent=fmt(bqn(s));
} catch(e) {
//if (console&&console.error) console.error(e.stack);
doc.rslt.classList.add('err');