Loading src/html.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -688,8 +688,14 @@ void libhtmlpp::HtmlString::_buildTree() { p = base + i; } } else { // Start from wsStart, not p: any whitespace just skipped above // is genuine leading whitespace of this text run (it wasn't // followed by '<', so it's not an inter-tag separator handled // above), and TextElement::parseElement collapses it to a // single leading space itself -- re-skipping it here would // drop that space entirely. add_element_node(&lastEl); size_t i = static_cast<size_t>(p - base); size_t i = static_cast<size_t>(wsStart - base); i = TextElement::parseElement(_Data, lastEl->element, i, lastEl->terminator); p = base + i; } Loading Loading
src/html.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -688,8 +688,14 @@ void libhtmlpp::HtmlString::_buildTree() { p = base + i; } } else { // Start from wsStart, not p: any whitespace just skipped above // is genuine leading whitespace of this text run (it wasn't // followed by '<', so it's not an inter-tag separator handled // above), and TextElement::parseElement collapses it to a // single leading space itself -- re-skipping it here would // drop that space entirely. add_element_node(&lastEl); size_t i = static_cast<size_t>(p - base); size_t i = static_cast<size_t>(wsStart - base); i = TextElement::parseElement(_Data, lastEl->element, i, lastEl->terminator); p = base + i; } Loading