ahri / ahriphplibs

My PHP Libraries
http://ahri.net
GNU Affero General Public License v3.0
3 stars 0 forks source link

Inlined adjacent NoteTexts fail to add whitespace #11

Closed ahri closed 14 years ago

ahri commented 14 years ago
$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 14 years ago

Should be solved as part of #8

ahri commented 14 years ago

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 14 years ago

fixes whitespace issues in adjacent NodeText nodes, closed by e573b4990244e13780529c6e57f2762151fb9944