From 4323e66ae9819c73c26f2dd6c79811cd569aea05 Mon Sep 17 00:00:00 2001 From: Sauli Anto Date: Sat, 10 Oct 2020 13:27:54 +0300 Subject: [PATCH] Rename inner writer --- src/automath.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/automath.js b/src/automath.js index 11cadeeef..c3cc469df 100644 --- a/src/automath.js +++ b/src/automath.js @@ -103,15 +103,15 @@ export default class AutoMath extends Plugin { insertPosition = this._positionToInsert; } - editor.model.change( writer => { + editor.model.change( innerWriter => { const params = Object.assign( extractDelimiters( text ), { type: mathConfig.outputType } ); - const mathElement = writer.createElement( params.display ? 'mathtex-display' : 'mathtex-inline', params ); + const mathElement = innerWriter.createElement( params.display ? 'mathtex-display' : 'mathtex-inline', params ); editor.model.insertContent( mathElement, insertPosition ); - writer.setSelection( mathElement, 'on' ); + innerWriter.setSelection( mathElement, 'on' ); } ); this._positionToInsert.detach();