Sfoglia il codice sorgente

Changed: Simplification in BlockQuoteCommand implementation.

Szymon Cofalik 7 anni fa
parent
commit
ece66cf7c7
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3 2
      packages/ckeditor5-block-quote/src/blockquotecommand.js

+ 3 - 2
packages/ckeditor5-block-quote/src/blockquotecommand.js

@@ -158,8 +158,9 @@ export default class BlockQuoteCommand extends Command {
 			let quote = findQuote( groupRange.start );
 
 			if ( !quote ) {
-				writer.wrap( groupRange, new Element( 'blockQuote' ) );
-				quote = groupRange.start.nodeAfter;
+				quote = new Element( 'blockQuote' );
+
+				writer.wrap( groupRange, quote );
 			}
 
 			quotesToMerge.push( quote );