mediawiki-extensions-Visual.../modules/ve/dm
Catrope 7319038ed6 Strip generated <p> tags in dataToDom
domToData wraps bare content in paragraph elements, which were then
converted to <p> tags by domToData. With this fix, HTML with "missing"
<p> tags actually round-trips through the editor correctly now, rather
than having <p> tags added wherever VE believes they should exist.

* Mark generated paragraph elements with .internal.generated = 'wrapper'
** This signifies the wrapper was generated but its contents were not,
   so the right thing to do when converting back to HTML is to remove
   the wrapper and keep the contents. We might want to use other values
   of generated in the future.
* Unwrap nodes with generated=wrapper when converting to HTML

Tests:
* Add 'generated': 'wrapper' as appropriate. Only affects 1 test
* Remove 'normalizedHtml' for this test because it is no longer needed
** Need to keep 'normalizedHtml' for now because we normalize hrefs
* Eventually the main example should test bare content, but that
  requires touching a lot of stuff. The main example could use some
  beefing up anyway.

Change-Id: I277ad5fe3f64e07c1bbf49007d6bbaecc90b7466
2012-08-16 16:09:28 -07:00
..
annotations Update LinkAnnotation for Parsoid href changes 2012-08-14 11:03:37 -07:00
nodes Rename fringeWhitespace to internal 2012-08-16 15:14:01 -07:00
ve.dm.Annotation.js
ve.dm.AnnotationFactory.js
ve.dm.BranchNode.js Rename fringeWhitespace to internal 2012-08-16 15:14:01 -07:00
ve.dm.Converter.js Strip generated <p> tags in dataToDom 2012-08-16 16:09:28 -07:00
ve.dm.Document.js Rename fringeWhitespace to internal 2012-08-16 15:14:01 -07:00
ve.dm.DocumentSynchronizer.js
ve.dm.js
ve.dm.LeafNode.js Rename fringeWhitespace to internal 2012-08-16 15:14:01 -07:00
ve.dm.Node.js Rename fringeWhitespace to internal 2012-08-16 15:14:01 -07:00
ve.dm.NodeFactory.js
ve.dm.Surface.js Merge "Added setSelection to ve.dm.Surface" 2012-08-14 18:56:19 +00:00
ve.dm.SurfaceFragment.js Merge "Added setSelection to ve.dm.Surface" 2012-08-14 18:56:19 +00:00
ve.dm.Transaction.js
ve.dm.TransactionProcessor.js