mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
[jscs] Enforce disallowSpacesInsideParentheses
* Change generated with `jscs -x .` * Well, except in the tokenizer. Change-Id: Ia516d0d150255c764e5c023274741c520cc9dce7
This commit is contained in:
parent
7661d25fdb
commit
3f8115937a
|
@ -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 <ref> 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 || "") + "</ol>";
|
||||
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');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue