mirror of
https://github.com/fastmail/Squire.git
synced 2024-12-22 15:23:29 -05:00
Ignore IMGs when stripping empty inlines.
When cleaning up pasted content, we remove any empty inline tags. However, we should not be stripping <img> tags (which are of course both inline and empty).
This commit is contained in:
parent
4c5b157d09
commit
1fbc166226
3 changed files with 3 additions and 3 deletions
|
@ -2255,7 +2255,7 @@ var removeEmptyInlines = function ( root ) {
|
|||
child;
|
||||
while ( l-- ) {
|
||||
child = children[l];
|
||||
if ( child.nodeType === ELEMENT_NODE ) {
|
||||
if ( child.nodeType === ELEMENT_NODE && child.nodeName !== 'IMG' ) {
|
||||
removeEmptyInlines( child );
|
||||
if ( isInline( child ) && !child.firstChild ) {
|
||||
root.removeChild( child );
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1176,7 +1176,7 @@ var removeEmptyInlines = function ( root ) {
|
|||
child;
|
||||
while ( l-- ) {
|
||||
child = children[l];
|
||||
if ( child.nodeType === ELEMENT_NODE ) {
|
||||
if ( child.nodeType === ELEMENT_NODE && child.nodeName !== 'IMG' ) {
|
||||
removeEmptyInlines( child );
|
||||
if ( isInline( child ) && !child.firstChild ) {
|
||||
root.removeChild( child );
|
||||
|
|
Loading…
Reference in a new issue