about summary refs log tree commit diff stats
path: root/main.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-03-12 20:52:44 +0100
committerbptato <nincsnevem662@gmail.com>2021-03-12 20:53:18 +0100
commit6084e104d5c3868196c9e2d3748c6627cf983470 (patch)
treef5103ffd0b33049e74b44f7a91448a22e3c8ef74 /main.nim
parent424f52e1f2eff84ee23a79b38e7932c2918351ed (diff)
downloadchawan-6084e104d5c3868196c9e2d3748c6627cf983470.tar.gz
Replaced parser, readline, etc...
Diffstat (limited to 'main.nim')
-rw-r--r--main.nim10
1 files changed, 4 insertions, 6 deletions
diff --git a/main.nim b/main.nim
index b2ce1ace..677b812f 100644
--- a/main.nim
+++ b/main.nim
@@ -29,7 +29,6 @@ proc getPageUri(uri: Uri): Stream =
   if uri.scheme == "" or uri.scheme == "file":
     return getLocalPage($moduri)
   else:
-    #return nparseHtml(getRemotePage($moduri))
     return getRemotePage($moduri)
 
 var buffers: seq[Buffer]
@@ -44,9 +43,9 @@ proc main*() =
   let buffer = newBuffer(attrs)
   let uri = parseUri(paramStr(1))
   buffers.add(buffer)
-  buffer.document = nparseHtml(getPageUri(uri))
+  buffer.document = parseHtml(getPageUri(uri))
   buffer.setLocation(uri)
-  buffer.nrenderHtml()
+  buffer.renderHtml()
   var lastUri = uri
   while displayPage(attrs, buffer):
     statusMsg("Loading...", buffer.height)
@@ -58,10 +57,9 @@ proc main*() =
       if uri.scheme == "" and uri.path == "" and uri.anchor != "":
         discard
       else:
-        buffer.document = nparseHtml(getPageUri(buffer.document.location))
-      buffer.nrenderHtml()
+        buffer.document = parseHtml(getPageUri(buffer.document.location))
+      buffer.renderHtml()
     lastUri = newUri
 
 #waitFor loadPage("https://lite.duckduckgo.com/lite/?q=hello%20world")
-#eprint mk_wcswidth_cjk("abc•de")
 main()