Inlined adjacent NoteTexts fail to add whitespace
Closed this issue · 3 comments
ahri commented
$node = new Node('p', 'foo', Node::INLINE);
$node->addText('bar');
Test::t('Inlined adjoining text elements with no whitespace', array($node, '__toString'), array(), 'return $result == "<p>foo bar</p>\n";');
echo $node; # returns: "<p>foobar</p>\n"
ahri commented
Above is solved as part of #8 but there is another issue:
$node = new Node('p', 'foo ', Node::INLINE);
$node->addText(' bar');
Test::t('Inlined adjoining text elements with whitespace', array($node, '__toString'), array(), 'return $result == "<p>foo bar</p>\n";');
echo str_replace(' ', '\_', $node); # returns: "<p>foo\_\_\_bar</p>\n"
ahri commented
fixes whitespace issues in adjacent NodeText nodes, closed by e573b4990244e13780529c6e57f2762151fb9944