mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 06:46:26 +00:00
7319038ed6
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 |
||
---|---|---|
.. | ||
ce | ||
dm | ||
init | ||
test | ||
ui | ||
ve.BranchNode.js | ||
ve.debug.js | ||
ve.Document.js | ||
ve.EventEmitter.js | ||
ve.Factory.js | ||
ve.js | ||
ve.LeafNode.js | ||
ve.Node.js | ||
ve.Position.js | ||
ve.Range.js | ||
ve.Surface.js |