about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-01-24 15:56:46 +0100
committerbptato <nincsnevem662@gmail.com>2022-01-24 15:56:46 +0100
commitbb02304965095879bafe393108855ee10278b0a6 (patch)
treef2f8a2eb40bcc833ee1596115e6ddd7efe9c36ca /src
parent06696ec0a2c7486a35550bfb9a6f6caba439d0a2 (diff)
downloadchawan-bb02304965095879bafe393108855ee10278b0a6.tar.gz
Fix head parsing
Diffstat (limited to 'src')
-rw-r--r--src/html/parser.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/html/parser.nim b/src/html/parser.nim
index ca505135..f898e329 100644
--- a/src/html/parser.nim
+++ b/src/html/parser.nim
@@ -369,7 +369,7 @@ proc processDocumentPart(state: var HTMLParseState, buf: string) =
     if state.in_comment:
       state.commentNode.data &= c
     else:
-      if not c.isWhitespace() and (state.textNode == nil or state.textNode.parentElement.tagType == TAG_HTML):
+      if not c.isWhitespace() and state.elementNode.tagType == TAG_HTML:
         state.textNode = nil
         processDocumentBody(state)
         processDocumentText(state)