diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index 98f45ca250..3888068851 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -671,13 +671,16 @@ ve.init.mw.ViewPageTarget.prototype.recordLastTransactionTime = function () { ve.init.mw.ViewPageTarget.prototype.checkForWikitextWarning = function () { var text, doc = this.surface.getView().getDocument(), selection = this.surface.getModel().getSelection(), - node = doc.getNodeFromOffset( selection.start ); + node = doc.getNodeFromOffset( selection.start ), + textMatches, + viewPageTarget = this; if ( !( node instanceof ve.ce.ContentBranchNode ) ) { return; } text = ve.ce.getDomText( node.$element[0] ); + textMatches = text.match( /\[\[|\{\{|''|