mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 07:13:08 -05:00
Don't strip WS between two inline nodes.
This commit is contained in:
parent
3b95f7b864
commit
1fac17b514
3 changed files with 17 additions and 1 deletions
|
@ -2483,6 +2483,14 @@ var cleanTree = function ( node, allowStyles ) {
|
|||
}
|
||||
continue;
|
||||
}
|
||||
// If we have just white space, it may still be important if it
|
||||
// separates two inline nodes, e.g. "<a>link</a> <a>link</a>".
|
||||
else if ( i && i + 1 < l &&
|
||||
isInline( children[ i - 1 ] ) &&
|
||||
isInline( children[ i + 1 ] ) ) {
|
||||
child.data = ' ';
|
||||
continue;
|
||||
}
|
||||
}
|
||||
node.removeChild( child );
|
||||
i -= 1;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1370,6 +1370,14 @@ var cleanTree = function ( node, allowStyles ) {
|
|||
}
|
||||
continue;
|
||||
}
|
||||
// If we have just white space, it may still be important if it
|
||||
// separates two inline nodes, e.g. "<a>link</a> <a>link</a>".
|
||||
else if ( i && i + 1 < l &&
|
||||
isInline( children[ i - 1 ] ) &&
|
||||
isInline( children[ i + 1 ] ) ) {
|
||||
child.data = ' ';
|
||||
continue;
|
||||
}
|
||||
}
|
||||
node.removeChild( child );
|
||||
i -= 1;
|
||||
|
|
Loading…
Reference in a new issue