mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-25 11:16:51 +00:00
Don't add newlines to text nodes inside lists
Change-Id: Ife11f7b87ab540a8a99f13315f889c2aa41a6a32
This commit is contained in:
parent
6bc9b9176a
commit
f08c0ca3a0
|
@ -591,7 +591,10 @@ ve.dm.Converter.prototype.getDomFromData = function( data ) {
|
|||
.find( '*' )
|
||||
.contents()
|
||||
.filter( function() {
|
||||
return this.nodeType == 3;
|
||||
// Text nodes only
|
||||
return this.nodeType == 3 &&
|
||||
// Exclude text nodes within lists
|
||||
$( this.parentNode ).closest( 'li, dd, dt' ).length === 0;
|
||||
} )
|
||||
.each( function() {
|
||||
this.data = fixupText( this.data, this.parentNode );
|
||||
|
|
Loading…
Reference in a new issue