Last modified: 2013-06-27 22:00:05 UTC
Created attachment 12627 [details] Screenshot of the problem in the serialization I think this is caused by Parsoid trying to preserver/re-add whitespace when round-tripping. Steps to reproduce issue: * Create a page like the default MediaWiki main page: <<<MW '''MediaWiki has been successfully installed.''' Consult the [//meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki sandbox software. 12 == Getting started == * [//www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list] * [//www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ] * [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list] * [//www.mediawiki.org/wiki/Localisation#Translation_resources Localise MediaWiki for your language] MW; * Edit it with VisualEditor * Put the cursor before "MediaWiki release mailing list" and select back until before the first character of the heading "Getting started". * Press backspace. You're now left with 2 of 4 items in the list and an empty heading. * Again, out the cursor before "MediaWiki release mailing list" and delete until you're behind "software. 12". You're now left with "MediaWiki release mailing list" in the paragraph and a list with 1 item. * Save page -> Review changes (Screenshot attached) It inserts a lot of new lines.
Subbu, could this be caused by e90e40c26cd8?
Krinkle: Could you provide a dump of VE's input and output DOM?
(In reply to comment #2) > Krinkle: Could you provide a dump of VE's input and output DOM? Given the steps to reproduce the bug from comment 0, I get the following: > doc = ve.instances[0].model.documentModel; > d = ve.createDocumentFromHtml( ve.init.mw.targets[0].originalHtml ); > d2 = ve.dm.converter.getDomFromData( doc.getFullData(), doc.getStore(), doc.getInternalList() ); > copy( d.body.innerHTML ); <p data-parsoid="{"dsr":[0,48,0,0]}"><b data-parsoid="{"dsr":[0,48,3,3]}">MediaWiki has been successfully installed.</b></p> <p data-parsoid="{"dsr":[50,171,0,0]}">Consult the <a rel="mw:ExtLink" href="//meta.wikimedia.org/wiki/Help:Contents" data-parsoid="{"targetOff":103,"dsr":[62,116,41,1]}">User's Guide</a> for information on using the wiki sandbox software. 12</p> <h2 data-parsoid="{"dsr":[173,194,2,2]}"> Getting started </h2> <ul data-parsoid="{"dsr":[195,535,0,0]}"><li data-parsoid="{"dsr":[195,281,1,0]}"> <a rel="mw:ExtLink" href="//www.mediawiki.org/wiki/Manual:Configuration_settings" data-parsoid="{"targetOff":253,"dsr":[197,281,56,1]}">Configuration settings list</a></li> <li data-parsoid="{"dsr":[282,335,1,0]}"> <a rel="mw:ExtLink" href="//www.mediawiki.org/wiki/Manual:FAQ" data-parsoid="{"targetOff":321,"dsr":[284,335,37,1]}">MediaWiki FAQ</a></li> <li data-parsoid="{"dsr":[336,434,1,0]}"> <a rel="mw:ExtLink" href="https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce" data-parsoid="{"targetOff":403,"dsr":[338,434,65,1]}">MediaWiki release mailing list</a></li> <li data-parsoid="{"dsr":[435,535,1,0]}"> <a rel="mw:ExtLink" href="//www.mediawiki.org/wiki/Localisation#Translation_resources" data-parsoid="{"targetOff":498,"dsr":[437,535,61,1]}">Localise MediaWiki for your language</a></li></ul> > copy( d2.body.innerHTML ); <p data-parsoid="{"dsr":[0,48,0,0]}"><b data-parsoid="{"dsr":[0,48,3,3]}">MediaWiki has been successfully installed.</b></p> <p data-parsoid="{"dsr":[50,171,0,0]}">Consult the <a href="//meta.wikimedia.org/wiki/Help:Contents" rel="mw:ExtLink" data-parsoid="{"targetOff":103,"dsr":[62,116,41,1]}">User's Guide</a> for information on using the wiki sandbox software. 12<a href="https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce" rel="mw:ExtLink" data-parsoid="{"targetOff":403,"dsr":[338,434,65,1]}">MediaWiki release mailing list</a></p><ul data-parsoid="{"dsr":[195,535,0,0]}"><li data-parsoid="{"dsr":[435,535,1,0]}"> <a href="//www.mediawiki.org/wiki/Localisation#Translation_resources" rel="mw:ExtLink" data-parsoid="{"targetOff":498,"dsr":[437,535,61,1]}">Localise MediaWiki for your language</a></li></ul>
This seems to be a bug in the diff interface in mediawiki. There are no extra newlines in the wikitext source as indicated by the diff. The diff incorrectly signals newlines where there are now. Steps to reproduce: * Do everything as Krinkle says * Actually save the page. * Look at the new wikitext source and look at what the diff tells you. I am leaving this bug open so others can verify independently.
There was a typo. It should read: ".... where there are *NONE* ...."
Please reopen if this an issue in Parsoid.