about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-07-17 18:40:08 +0200
committerbptato <nincsnevem662@gmail.com>2023-07-17 18:40:08 +0200
commit7f66e33290a7daf66358fe9ba607f1b78857c645 (patch)
tree5f1835099489d8788c4ff0bd711131989b7fe71f /src/html
parentc1cbff13d526b2ea6ab57a0677cda5d6157422b2 (diff)
downloadchawan-7f66e33290a7daf66358fe9ba607f1b78857c645.tar.gz
Fix compilation on nim 1.6.10
It appears there is a compiler bug we have to work around there.
Diffstat (limited to 'src/html')
-rw-r--r--src/html/htmlparser.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/html/htmlparser.nim b/src/html/htmlparser.nim
index 08e30257..0791a3af 100644
--- a/src/html/htmlparser.nim
+++ b/src/html/htmlparser.nim
@@ -2718,9 +2718,10 @@ proc parseHTML*[Handle](inputStream: Stream, dombuilder: DOMBuilder[Handle],
     else:
       DECODER_ERROR_MODE_FATAL
     let decoder = newDecoderStream(inputStream, parser.charset, errormode = em)
+    proc x(e: ParseError) =
+      parser.parseError(e)
     let onParseError = if parser.hasParseError():
-      proc(e: ParseError) =
-        parser.parseError(e)
+      x
     else:
       nil
     parser.tokenizer = newTokenizer(decoder, onParseError)