about summary refs log tree commit diff stats
path: root/src/utils
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-08-08 21:01:47 +0200
committerbptato <nincsnevem662@gmail.com>2021-08-08 21:01:47 +0200
commitd7cb6d7d610df886d028ca6d6aecf3d9a3ba54ff (patch)
tree5eb75d8b95ed9e6eab1e7f3d72b8afd1adc0e283 /src/utils
parentfa4560f63e38886b2b7541642b9aa1656dc40508 (diff)
downloadchawan-d7cb6d7d610df886d028ca6d6aecf3d9a3ba54ff.tar.gz
Implement CSS display none in box renderer etc.
Other changes being bugfixes and a temporary implementation of "view
source"
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/eprint.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/utils/eprint.nim b/src/utils/eprint.nim
index 128d34d9..d13fcf91 100644
--- a/src/utils/eprint.nim
+++ b/src/utils/eprint.nim
@@ -10,6 +10,17 @@ template eprint*(s: varargs[string, `$`]) = {.cast(noSideEffect).}:
     stderr.write(x)
   stderr.write('\n')
 
+template eecho*(s: varargs[string, `$`]) = {.cast(noSideEffect).}:
+  var a = false
+  var o = ""
+  for x in s:
+    if not a:
+      a = true
+    else:
+      o &= ' '
+    o &= x
+  echo o
+
 template print*(s: varargs[string, `$`]) =
   for x in s:
     stdout.write(x)