Ticket #5628: 5628.patch

File 5628.patch, 699 bytes (added by Garry Yao, 11 years ago)
  • _source/plugins/styles/plugin.js

     
    768768                }
    769769        }
    770770
     771        var nonWhitespaces = CKEDITOR.dom.walker.whitespaces( true );
    771772        /**
    772773         * Merge a <pre> block with a previous sibling if available.
    773774         */
    774775        function mergePre( preBlock )
    775776        {
    776777                var previousBlock;
    777                 if ( !( ( previousBlock = preBlock.getPreviousSourceNode( true, CKEDITOR.NODE_ELEMENT ) )
     778                if ( !( ( previousBlock = preBlock.getPrevious( nonWhitespaces ) )
    778779                                 && previousBlock.is
    779780                                 && previousBlock.is( 'pre') ) )
    780781                        return;
© 2003 – 2021 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy