From dee279f72ce64708846da08c93e6d2db7b33a837 Mon Sep 17 00:00:00 2001 From: Krinkle Date: Thu, 19 Jan 2012 23:52:46 +0000 Subject: [PATCH] [mediawiki.js] edit comment * Follows-up r108230 --- resources/mediawiki/mediawiki.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js index 35ae8fc488..585483b764 100644 --- a/resources/mediawiki/mediawiki.js +++ b/resources/mediawiki/mediawiki.js @@ -163,7 +163,9 @@ var mw = ( function ( $, undefined ) { * @return string Message as a string in the current form or if key does not exist. */ toString: function() { - if ( !this.exists( ) ) { + var text; + + if ( !this.exists() ) { // Use as text if key does not exist if ( this.format !== 'plain' ) { // format 'escape' and 'parse' need to have the brackets and key html escaped @@ -172,13 +174,11 @@ var mw = ( function ( $, undefined ) { return '<' + this.key + '>'; } - var text; if ( this.format === 'plain' ) { - // FIXME this is wrong. There should be a way - // to tell parser() whether we're looking for - // plain text or HTML, but I don't know jQueryMsg - // well enough to implement this. - // Currently it always outputs HTML + // @todo FIXME: Although not applicable to core Message, + // Plugins like jQueryMsg should be able to distinguish + // between 'plain' (only variable replacement and plural/gender) + // and actually parsing wikitext to HTML. text = this.parser(); } -- 2.20.1