mirror of
https://github.com/jezhiggins/arabica
synced 2024-11-17 07:48:50 +01:00
Corrected normalization - only adjacent text nodes should be combined
This commit is contained in:
parent
d947908c68
commit
7e9722ddc3
1 changed files with 2 additions and 4 deletions
|
@ -102,13 +102,11 @@ class NodeImpl : virtual public DOM::Node_impl<stringT, string_adaptorT>
|
|||
{
|
||||
DOMNode_implT*next = child->getNextSibling();
|
||||
|
||||
if((child->getNodeType() == DOM::Node_base::TEXT_NODE) ||
|
||||
(child->getNodeType() == DOM::Node_base::CDATA_SECTION_NODE))
|
||||
if(child->getNodeType() == DOM::Node_base::TEXT_NODE)
|
||||
{
|
||||
DOMText_implT* textNode = dynamic_cast<DOMText_implT*>(child);
|
||||
while((next != 0) &&
|
||||
((next->getNodeType() == DOM::Node_base::TEXT_NODE) ||
|
||||
(next->getNodeType() == DOM::Node_base::CDATA_SECTION_NODE)))
|
||||
(next->getNodeType() == DOM::Node_base::TEXT_NODE))
|
||||
{
|
||||
textNode->appendData(next->getNodeValue());
|
||||
removeChild(next);
|
||||
|
|
Loading…
Reference in a new issue