From 3f8115937a8055f47b818262cf6d23105c307809 Mon Sep 17 00:00:00 2001 From: Arlo Breault Date: Thu, 23 Jul 2015 11:45:27 -0700 Subject: [PATCH] [jscs] Enforce disallowSpacesInsideParentheses * Change generated with `jscs -x .` * Well, except in the tokenizer. Change-Id: Ia516d0d150255c764e5c023274741c520cc9dce7 --- lib/ext.Cite.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/ext.Cite.js b/lib/ext.Cite.js index d5edb266d..e792c0170 100644 --- a/lib/ext.Cite.js +++ b/lib/ext.Cite.js @@ -87,7 +87,7 @@ function hasRef(node) { /** * Handle ref tokens */ -Ref.prototype.handleRef = function( manager, pipelineOpts, refTok, cb ) { +Ref.prototype.handleRef = function(manager, pipelineOpts, refTok, cb) { // Nested tags at the top level are considered errors // But, inside templates, they are supported if (!pipelineOpts.inTemplate && pipelineOpts.extTag === "ref") { @@ -217,10 +217,10 @@ function ReferencesData() { ReferencesData.prototype.getRefGroup = function(groupName, allocIfMissing) { groupName = groupName || ''; - if ( !this.refGroups.has( groupName ) && allocIfMissing ) { - this.refGroups.set( groupName, new RefGroup( groupName ) ); + if (!this.refGroups.has(groupName) && allocIfMissing) { + this.refGroups.set(groupName, new RefGroup(groupName)); } - return this.refGroups.get( groupName ); + return this.refGroups.get(groupName); }; ReferencesData.prototype.removeRefGroup = function(groupName) { @@ -265,9 +265,9 @@ ReferencesData.prototype.add = function(groupName, refName, about, skipLinkback) name: refName, target: noteId }; - group.refs.push( ref ); + group.refs.push(ref); if (refName) { - group.indexByName.set( refName, ref ); + group.indexByName.set(refName, ref); } } @@ -285,7 +285,7 @@ function References(cite) { /** * Sanitize the references tag and convert it into a meta-token */ -References.prototype.handleReferences = function( manager, pipelineOpts, refsTok, cb ) { +References.prototype.handleReferences = function(manager, pipelineOpts, refsTok, cb) { var env = manager.env; // group is the only recognized option? @@ -305,13 +305,13 @@ References.prototype.handleReferences = function( manager, pipelineOpts, refsTok " typeof='mw:Extension/references'" + " about='" + referencesId + "'" + ">" + (refsBody || "") + ""; var olProcessor = function(ol) { - var dp = DU.getDataParsoid( ol ); + var dp = DU.getDataParsoid(ol); dp.src = refsTok.getAttribute('source'); - if ( refsOpts.group ) { + if (refsOpts.group) { dp.group = refsOpts.group; ol.setAttribute('data-mw-group', refsOpts.group); } - DU.storeDataParsoid( ol, dp ); + DU.storeDataParsoid(ol, dp); }; cb({ @@ -418,8 +418,8 @@ References.prototype.extractRefFromNode = function(node, refsData, src: dp.src, dsr: dp.dsr }; - DU.setDataParsoid( span, dataParsoid ); - DU.setDataMw( span, dataMW ); + DU.setDataParsoid(span, dataParsoid); + DU.setDataMw(span, dataMW); // refLink is the link to the citation var refLink = doc.createElement('a'); @@ -443,8 +443,8 @@ References.prototype.extractRefFromNode = function(node, refsData, if (!nestedInReferences) { node.parentNode.insertBefore(span, node); } else { - DU.storeDataParsoid( span, dataParsoid ); - DU.storeDataMw( span, dataMW ); + DU.storeDataParsoid(span, dataParsoid); + DU.storeDataMw(span, dataMW); refsInReferencesHTML.push(DU.serializeNode(span).str, '\n'); }