commit 037813c2ed54fb055fd097ca353b08bce30ef577
parent e6bb278a3c6ec14cf1815994d29a2afe1c6c52d7
Author: Pavel Renev <an2qzavok@gmail.com>
Date: Sun, 31 Jan 2021 13:08:30 +0000
html5dom: fix some text nodes not getting their parent properly
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tree.c b/tree.c
@@ -126,7 +126,10 @@ threadtreeconstr(void *v)
free(strnode);
break;
case TSTART:
- if (tnode != nil) pushtext();
+ if (tnode != nil) {
+ adopt(pnode, tnode);
+ pushtext();
+ }
strnode = newnode();
nwrite(strnode, "type", "element", 7);
nwrite(strnode, "name", s_to_c(tok->name),