mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 20:12:43 +00:00 
			
		
		
		
	LibXML: Set parents for text and comment nodes
This commit is contained in:
		
							parent
							
								
									6368e6ca12
								
							
						
					
					
						commit
						1079f178cf
					
				
					 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
	
	 Dan Klishch
						Dan Klishch