about summary refs log tree commit diff stats
path: root/display.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-01-31 23:03:58 +0100
committerbptato <nincsnevem662@gmail.com>2021-01-31 23:03:58 +0100
commit5dfffae926009defec5cc3ab170c645967c68f33 (patch)
treedf8154a8af182b5e13e6e9b1a1a9b70a3129915c /display.nim
parente3a2ad473e2239bef3726e3ad6657f5f41c9462c (diff)
downloadchawan-5dfffae926009defec5cc3ab170c645967c68f33.tar.gz
meh
Diffstat (limited to 'display.nim')
-rw-r--r--display.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/display.nim b/display.nim
index da34f6c5..c7cd4bb4 100644
--- a/display.nim
+++ b/display.nim
@@ -275,8 +275,10 @@ proc nrenderHtml*(buffer: Buffer) =
     let currElem = stack.pop()
     buffer.addNode(currElem)
     buffer.renderNode(currElem, state)
-    for item in currElem.childNodes:
-      stack.add(item)
+    var i = currElem.childNodes.len - 1
+    while i >= 0:
+      stack.add(currElem.childNodes[i])
+      i -= 1
 
   buffer.setLastHtmlLine(state)