tag->closing.end = tag->closing.start;
}
else {
- next_tag_offset = len;
- tag->closing.end = len;
+ next_tag_offset = tag->content_offset;
+ tag->closing.end = tag->content_offset;
}
}
if (tag->closing.start == -1) {
}
}
+ if (cur_tag && !(cur_tag->flags & FL_CLOSED) && cur_tag != &cur_closing_tag) {
+ cur_closing_tag.parent = cur_tag;
+ cur_closing_tag.id = cur_tag->id;
+ cur_tag = &cur_closing_tag;
+ html_check_balance(hc, cur_tag,
+ end - start, end - start);
+ }
+
/* Propagate styles */
hc->traverse_block_tags([&hc, &pool](const html_tag *tag) -> bool {