Last modified: 2014-03-10 18:21:20 UTC
See seler bug below when a text node is inserted outside a <p> tag. -------------------- [subbu@earth tests] echo "foo\n\nbar" > /tmp/wt [subbu@earth tests] node parse < /tmp/wt > /tmp/old.html [subbu@earth tests] cp /tmp/old.html /tmp/new.html [subbu@earth tests] vi /tmp/new.html [subbu@earth tests] cat /tmp/new.html <body data-parsoid='{"dsr":[0,9,0,0]}'><p data-parsoid='{"dsr":[0,3,0,0]}'>foo</p>NEW<p data-parsoid='{"dsr":[5,8,0,0]}'>bar</p> </body> [subbu@earth tests] node parse --html2wt --selser --oldtextfile /tmp/t --oldhtmlfile /tmp/old.html < /tmp/new.html fooNEW bar [subbu@earth tests] node parse --html2wt < /tmp/new.html fooNEW bar --------------------
There are a number of image-related selser failures due to this bug.
(In reply to ssastry from comment #0) > See seler bug below when a text node is inserted outside a <p> tag. *selser > [subbu@earth tests] node parse --html2wt --selser --oldtextfile /tmp/t > --oldhtmlfile /tmp/old.html < /tmp/new.html */tmp/wt
I don't see how we can generally serialize this kind of HTML so that it round-trips html2html.
Yes, we cannot make this survive html2html. For now, I am marking this an enhancement for addressing in the context of the class of bugs we have for accepting arbitrary html. Meanwhile, I'll fix up parserTests.js to eliminate these kinds of (simulated) edits.