mediawiki-extensions-Visual.../modules/ve/dm
Catrope 84e598953a Wrap inline elements properly
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
2012-10-17 13:50:29 -07:00
..
annotations Whitespace and comment cleanup for dm annotation classes 2012-10-17 12:35:28 -07:00
nodes Fix constructor names; remove redundant hasOwnProperty. 2012-10-08 06:15:20 +02:00
ve.dm.Annotation.js New annotation API: Annotation and AnnotationFactory classes 2012-10-12 15:07:02 -07:00
ve.dm.AnnotationFactory.js New annotation API: Annotation and AnnotationFactory classes 2012-10-12 15:07:02 -07:00
ve.dm.BranchNode.js Whitespace and comments 2012-09-17 16:53:03 -07:00
ve.dm.Converter.js Wrap inline elements properly 2012-10-17 13:50:29 -07:00
ve.dm.Document.js Whitespace and comment cleanup for dm annotation classes 2012-10-17 12:35:28 -07:00
ve.dm.DocumentSynchronizer.js Fix JS error in DocumentSynchronizer when adding to an empty document 2012-10-15 15:01:39 -07:00
ve.dm.js New annotation API: Annotation and AnnotationFactory classes 2012-10-12 15:07:02 -07:00
ve.dm.LeafNode.js Whitespace and comments 2012-09-17 16:53:03 -07:00
ve.dm.Node.js Rename ve_foo_bar back to VeFooBar per discussion 2012-09-06 16:15:55 -07:00
ve.dm.NodeFactory.js Rename ve_foo_bar back to VeFooBar per discussion 2012-09-06 16:15:55 -07:00
ve.dm.Surface.js Fix exception when deleting all text (Ctrl+A Backspace) 2012-10-15 15:03:08 -07:00
ve.dm.SurfaceFragment.js Reversed the default value of autoSelect in surface fragments 2012-10-12 17:34:15 -07:00
ve.dm.Transaction.js Added reversed boolean for translateOffset 2012-10-10 14:59:30 -07:00
ve.dm.TransactionProcessor.js Revert "No longer create zero-length text nodes" 2012-10-12 18:04:15 +00:00