mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
84e598953a
The HTML "1<br/>2" was being converted to a linmod that looked like "<p>1</p><br></br><p>2</p>". This commit fixes the wrapping logic such that the result is "<p>1<br></br>2</p>" instead. In general, inline nodes (content nodes) should not interrupt the wrapping, but block nodes should. This creates a problem for alien nodes: normally, we determine whether an alien node is a block alien or an inline alien based on context, but if we're in wrapping mode we're unsure of the context. We can't tell the difference between "1<tt>Foo</tt>2" (should be wrapped as one, because tt is inline) and "1<figure></figure>2" (1 and 2 should be wrapped separately, because figure is block) using context alone, so in these cases (and ONLY in these cases) we look up whether the HTML tag in question is an inline tag or a block tag and use that to decide. Change-Id: I75e7f3da387dd401d9b93e09a21751951eccbb83 |
||
---|---|---|
.. | ||
nodes | ||
ve.dm.AnnotationFactory.test.js | ||
ve.dm.BranchNode.test.js | ||
ve.dm.Converter.test.js | ||
ve.dm.Document.test.js | ||
ve.dm.DocumentSynchronizer.test.js | ||
ve.dm.example.js | ||
ve.dm.LeafNode.test.js | ||
ve.dm.Node.test.js | ||
ve.dm.NodeFactory.test.js | ||
ve.dm.Surface.test.js | ||
ve.dm.SurfaceFragment.test.js | ||
ve.dm.Transaction.test.js | ||
ve.dm.TransactionProcessor.test.js |