From 761bb17f71c63fc7602f6290b24a042be836e0c2 Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Mon, 2 Oct 2023 11:39:53 +0200 Subject: log indent --- play.js | 6 ++++++ 1 file changed, 6 insertions(+) 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' -- cgit v1.2.3