8
0
Эх сурвалжийг харах

Aligned code to with new Batch#setAttributes API.

Oskar Wróbel 8 жил өмнө
parent
commit
120de4659f

+ 2 - 2
packages/ckeditor5-autoformat/src/inlineautoformatengine.js

@@ -62,7 +62,7 @@ export default class InlineAutoformatEngine {
 	 *		// Use formatting callback:
 	 *		// Use formatting callback:
 	 *		new InlineAutoformatEngine( editor, /(\*\*)([^\*]+?)(\*\*)$/g, ( batch, validRanges ) => {
 	 *		new InlineAutoformatEngine( editor, /(\*\*)([^\*]+?)(\*\*)$/g, ( batch, validRanges ) => {
 	 *			for ( let range of validRanges ) {
 	 *			for ( let range of validRanges ) {
-	 *				batch.setAttribute( range, command, true );
+	 *				batch.setAttribute( command, true, range );
 	 *			}
 	 *			}
 	 *		} );
 	 *		} );
 	 */
 	 */
@@ -132,7 +132,7 @@ export default class InlineAutoformatEngine {
 		// A format callback run on matched text.
 		// A format callback run on matched text.
 		formatCallback = formatCallback || ( ( batch, validRanges ) => {
 		formatCallback = formatCallback || ( ( batch, validRanges ) => {
 			for ( const range of validRanges ) {
 			for ( const range of validRanges ) {
-				batch.setAttribute( range, command, true );
+				batch.setAttribute( command, true, range );
 			}
 			}
 		} );
 		} );