mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 01:51:03 +09:00
LibXML: Set parents for text and comment nodes
This commit is contained in:
parent
6368e6ca12
commit
1079f178cf
Notes:
sideshowbarker
2024-07-17 04:10:16 +09:00
Author: https://github.com/DanShaders
Commit: 1079f178cf
Pull-request: https://github.com/SerenityOS/serenity/pull/20629
1 changed files with 2 additions and 2 deletions
|
@ -130,7 +130,7 @@ void Parser::append_text(StringView text, Offset offset)
|
|||
}
|
||||
Node::Text text_node;
|
||||
text_node.builder.append(text);
|
||||
node.children.append(make<Node>(offset, move(text_node)));
|
||||
node.children.append(make<Node>(offset, move(text_node), m_entered_node));
|
||||
},
|
||||
[&](auto&) {
|
||||
// Can't enter a text or comment node.
|
||||
|
@ -152,7 +152,7 @@ void Parser::append_comment(StringView text, Offset offset)
|
|||
|
||||
m_entered_node->content.visit(
|
||||
[&](Node::Element& node) {
|
||||
node.children.append(make<Node>(offset, Node::Comment { text }));
|
||||
node.children.append(make<Node>(offset, Node::Comment { text }, m_entered_node));
|
||||
},
|
||||
[&](auto&) {
|
||||
// Can't enter a text or comment node.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue