diff --git a/lib/ext.Cite.js b/lib/ext.Cite.js index 6ca6998ef..2cf17db14 100644 --- a/lib/ext.Cite.js +++ b/lib/ext.Cite.js @@ -48,7 +48,7 @@ function processExtSource(manager, extToken, opts) { opts.pipelineOpts = Util.extendProps({}, opts.pipelineOpts, { wrapTemplates: true }); var tsr = extToken.dataAttribs.tsr; - opts.srcOffsets = [ tsr[0] +tagWidths[0] +leadingWS.length, tsr[1] -tagWidths[1] ]; + opts.srcOffsets = [ tsr[0] + tagWidths[0] + leadingWS.length, tsr[1] - tagWidths[1] ]; // Process ref content Util.processContentInPipeline(manager.env, manager.frame, content, opts); @@ -158,7 +158,7 @@ function makeValidIdAttr(val) { // It also considers entities equal to their encoding (i.e. '&' === '&') // and then substitutes % with . var v = entities.decodeHTML(val).replace(/\s/g, '_'); - return encodeURIComponent(v).replace(/%/g,"."); + return encodeURIComponent(v).replace(/%/g, "."); } RefGroup.prototype.renderLine = function(refsList, ref) { @@ -251,7 +251,7 @@ ReferencesData.prototype.add = function(groupName, refName, about, skipLinkback) // Notes (references) whose ref doesn't have a name are 'cite_note-' + index // Notes whose ref has a name are 'cite_note-' + name + '-' + index var n = this.index, - refKey = (1 +n) + '', + refKey = (1 + n) + '', refIdBase = 'cite_ref-' + (refName ? refName + '_' + refKey : refKey), noteId = 'cite_note-' + (refName ? refName + '-' + refKey : refKey);