diff options
author | bptato <nincsnevem662@gmail.com> | 2023-07-17 18:40:08 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-07-17 18:40:08 +0200 |
commit | 7f66e33290a7daf66358fe9ba607f1b78857c645 (patch) | |
tree | 5f1835099489d8788c4ff0bd711131989b7fe71f /src/html | |
parent | c1cbff13d526b2ea6ab57a0677cda5d6157422b2 (diff) | |
download | chawan-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.nim | 5 |
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) |