From 9a38ccfe12e1e63d22f3609485713ddd252bb84d Mon Sep 17 00:00:00 2001 From: Krenair Date: Thu, 30 Jan 2014 01:25:37 +0000 Subject: [PATCH] Hide wikitext warning notification when the user removes the markup Bug: 51701 Change-Id: I2b24b91175768334c5111bf8e550be9c34c12f69 --- .../init/targets/ve.init.mw.ViewPageTarget.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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 2bfcafcc79..d1e37c2df0 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -657,13 +657,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( /\[\[|\{\{|''|