Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Switched to 'fastDiff' for text node updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
f1ames committed Apr 16, 2018
1 parent adf5328 commit e6880c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/view/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import remove from '@ckeditor/ckeditor5-utils/src/dom/remove';
import ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';
import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
import isText from '@ckeditor/ckeditor5-utils/src/dom/istext';
import diffToChanges from '@ckeditor/ckeditor5-utils/src/difftochanges';
import fastDiff from '@ckeditor/ckeditor5-utils/src/fastdiff';

/**
* Renderer updates DOM structure and selection, to make them a reflection of the view structure and selection.
Expand Down Expand Up @@ -427,7 +427,7 @@ export default class Renderer {
}

if ( actualText != expectedText ) {
const actions = diffToChanges( diff( actualText, expectedText ), expectedText );
const actions = fastDiff( actualText, expectedText );

for ( const action of actions ) {
if ( action.type === 'insert' ) {
Expand Down
2 changes: 1 addition & 1 deletion tests/view/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2418,7 +2418,7 @@ describe( 'Renderer', () => {
} );
} );

describe( '_updateChildren', () => {
describe( '_updateText', () => {
let viewRoot, domRoot;

beforeEach( () => {
Expand Down

0 comments on commit e6880c4

Please sign in to comment.