IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
497 | 497 | } |
498 | 498 | |
499 | 499 | var elementType = CKEDITOR.dom.walker.nodeType( CKEDITOR.NODE_ELEMENT ); |
500 | | // Merge list items with direction preserved. (#7448) |
501 | | function mergeListItems( from, into, refNode, toHead ) |
| 500 | |
| 501 | // Merge child nodes with direction preserved. (#7448) |
| 502 | function mergeChildren( from, into, refNode, forward ) |
502 | 503 | { |
503 | 504 | var child, itemDir; |
504 | | while ( ( child = from.getFirst( elementType ) ) ) |
| 505 | while ( ( child = from[ forward ? 'getLast' : 'getFirst' ]( elementType ) ) ) |
505 | 506 | { |
506 | 507 | if ( ( itemDir = child.getDirection( 1 ) ) !== into.getDirection( 1 ) ) |
507 | 508 | child.setAttribute( 'dir', itemDir ); |
… |
… |
|
509 | 510 | child.remove(); |
510 | 511 | |
511 | 512 | refNode ? |
512 | | child[ toHead ? 'insertBefore' : 'insertAfter' ]( refNode ) : |
513 | | into.append( child, toHead ); |
| 513 | child[ forward ? 'insertBefore' : 'insertAfter' ]( refNode ) : |
| 514 | into.append( child, forward ); |
514 | 515 | } |
515 | 516 | } |
516 | 517 | |
… |
… |
|
662 | 663 | var mergeSibling, listCommand = this; |
663 | 664 | ( mergeSibling = function( rtl ) |
664 | 665 | { |
665 | | |
666 | | var sibling = listNode[ rtl ? |
667 | | 'getPrevious' : 'getNext' ]( CKEDITOR.dom.walker.whitespaces( true ) ); |
| 666 | var sibling = listNode[ rtl ? 'getPrevious' : 'getNext' ]( nonEmpty ); |
668 | 667 | if ( sibling && sibling.getName && |
669 | 668 | sibling.getName() == listCommand.type ) |
670 | 669 | { |
671 | 670 | // Move children order by merge direction.(#3820) |
672 | | mergeListItems( listNode, sibling, null, !rtl ); |
| 671 | mergeChildren( listNode, sibling, null, !rtl ); |
673 | 672 | |
674 | 673 | listNode.remove(); |
675 | 674 | listNode = sibling; |
… |
… |
|
798 | 797 | // If next line is in the sub list of the current list item. |
799 | 798 | if ( currentLi.contains( nextLi ) ) |
800 | 799 | { |
801 | | mergeListItems( sublist, nextLi.getParent(), nextLi ); |
| 800 | mergeChildren( sublist, nextLi.getParent(), nextLi ); |
802 | 801 | sublist.remove(); |
803 | 802 | } |
804 | 803 | // Migrate the sub list to current list item. |