summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-10-02 11:39:53 +0200
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-10-02 11:39:53 +0200
commit761bb17f71c63fc7602f6290b24a042be836e0c2 (patch)
tree655e7c160b3fbc0bb83185122db62a171bce128a
parent958a4caf1a001c7abe2a928835cae640ec23012a (diff)
downloadalgeria-761bb17f71c63fc7602f6290b24a042be836e0c2.tar.gz
log indent
-rw-r--r--play.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/play.js b/play.js
index 2b08a6d..0c878e1 100644
--- a/play.js
+++ b/play.js
@@ -422,6 +422,12 @@ function on_update() { // eslint-disable-line no-unused-vars
function on_log(text) { // eslint-disable-line no-unused-vars
let p = document.createElement("div")
+
+ if (text.match(/^>/)) {
+ text = text.substring(1)
+ p.className = "i"
+ }
+
if (text.match(/^\.h1/)) {
text = text.substring(4)
p.className = 'h1'