From 57dfd89383b113b7e2e34766b69a5739e22a5bde Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Thu, 3 May 2012 16:15:34 +0200 Subject: [PATCH] Handle upright option properly Change-Id: I831fcccf874f9a0505e88eb76d269b1d2f68e3e0 --- modules/parser/ext.core.LinkHandler.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/parser/ext.core.LinkHandler.js b/modules/parser/ext.core.LinkHandler.js index caeddbdae5..16cc65e8af 100644 --- a/modules/parser/ext.core.LinkHandler.js +++ b/modules/parser/ext.core.LinkHandler.js @@ -90,9 +90,7 @@ WikiLinkHandler.prototype._simpleImageOptions = { 'frameless': 'format', 'frame': 'format', 'thumbnail': 'format', - 'thumb': 'format', - // orientation, - 'upright': 'orientation' + 'thumb': 'format' }; WikiLinkHandler.prototype._prefixImageOptions = { @@ -100,7 +98,8 @@ WikiLinkHandler.prototype._prefixImageOptions = { 'alt': 'alt', 'page': 'page', 'thumbnail': 'thumb', - 'thumb': 'thumb' + 'thumb': 'thumb', + 'upright': 'aspect' }; WikiLinkHandler.prototype.renderFile = function ( token, frame, cb, title ) { @@ -152,7 +151,7 @@ WikiLinkHandler.prototype.renderFile = function ( token, frame, cb, title ) { } else { var bits = oText.split( '=', 2 ), key = this._prefixImageOptions[ bits[0].trim().toLowerCase() ]; - if ( bits.length > 1 && key) { + if ( bits[0] && key) { oHash[key] = bits[1]; options.push( new KV( key, bits[1] ) ); //console.warn('handle prefix ' + bits );