about summary refs log tree commit diff stats
path: root/src/main.nim
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/main.nim
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/main.nim')
-rw-r--r--src/main.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.nim b/src/main.nim
index 6f940b50..4ce11f79 100644
--- a/src/main.nim
+++ b/src/main.nim
@@ -42,10 +42,10 @@ proc main*() =
   let buffer = newBuffer(attrs)
   let uri = parseUri(paramStr(1))
   buffers.add(buffer)
-  buffer.document = parseHtml(getPageUri(uri))
+  buffer.source = getPageUri(uri).readAll() #TODO buffer.renderPlainText(getPageUri(uri).readAll())
+  buffer.document = parseHtml(newStringStream(buffer.source))
   buffer.setLocation(uri)
   buffer.document.applyDefaultStylesheet()
-  #buffer.renderPlainText(getPageUri(uri).readAll())
   buffer.renderDocument()
   var lastUri = uri
   while displayPage(attrs, buffer):