Merge pull request #1662 from disy-mk/jshint_semicol_utils

adds missing semicolons in src/node/utils folder
This commit is contained in:
John McLear 2013-03-23 17:31:33 -07:00
commit 34e3e2f432
9 changed files with 33 additions and 35 deletions

View File

@ -63,7 +63,7 @@ if(os.type().indexOf("Windows") > -1)
callback();
});
}
};
exports.convertFile = function(srcFile, destFile, type, callback)
{
@ -121,7 +121,7 @@ else
firstPrompt = false;
}
});
}
};
spawnAbiword();
doConvertTask = function(task, callback)
@ -135,7 +135,7 @@ else
console.log("queue continue");
task.callback(err);
};
}
};
//Queue with the converts we have to do
var queue = async.queue(doConvertTask, 1);

View File

@ -316,7 +316,7 @@ exports.getPadDokuWikiDocument = function (padId, revNum, callback)
getPadDokuWiki(pad, revNum, callback);
});
}
};
function _escapeDokuWiki(s)
{

View File

@ -45,7 +45,7 @@ exports.getPadPlainText = function(pad, revNum){
}
return pieces.join('');
}
};
exports._analyzeLine = function(text, aline, apool){
@ -77,11 +77,11 @@ exports._analyzeLine = function(text, aline, apool){
line.aline = aline;
}
return line;
}
};
exports._encodeWhitespace = function(s){
return s.replace(/[^\x21-\x7E\s\t\n\r]/g, function(c){
return "&#" +c.charCodeAt(0) + ";"
return "&#" +c.charCodeAt(0) + ";";
});
}
};

View File

@ -21,7 +21,7 @@ var padManager = require("../db/PadManager");
var ERR = require("async-stacktrace");
var Security = require('ep_etherpad-lite/static/js/security');
var hooks = require('ep_etherpad-lite/static/js/pluginfw/hooks');
var getPadPlainText = require('./ExportHelper').getPadPlainText
var getPadPlainText = require('./ExportHelper').getPadPlainText;
var _analyzeLine = require('./ExportHelper')._analyzeLine;
var _encodeWhitespace = require('./ExportHelper')._encodeWhitespace;
@ -515,7 +515,7 @@ exports.getPadHTMLDocument = function (padId, revNum, noDocType, callback)
callback(null, head + html + foot);
});
});
}
};
// copied from ACE
@ -595,4 +595,3 @@ function _processSpaces(s){
}
return parts.join('');
}

View File

@ -289,5 +289,4 @@ exports.getPadTXTDocument = function (padId, revNum, noDocType, callback)
callback(null, html);
});
});
}
};

View File

@ -125,11 +125,11 @@ function requestURIs(locations, method, headers, callback) {
}
function completed() {
var statuss = responses.map(function (x) {return x[0]});
var headerss = responses.map(function (x) {return x[1]});
var contentss = responses.map(function (x) {return x[2]});
var statuss = responses.map(function (x) {return x[0];});
var headerss = responses.map(function (x) {return x[1];});
var contentss = responses.map(function (x) {return x[2];});
callback(statuss, headerss, contentss);
};
}
}
/**
@ -263,7 +263,7 @@ function getAceFile(callback) {
var filename = item.match(/"([^"]*)"/)[1];
var request = require('request');
var baseURI = 'http://localhost:' + settings.port
var baseURI = 'http://localhost:' + settings.port;
var resourceURI = baseURI + path.normalize(path.join('/static/', filename));
resourceURI = resourceURI.replace(/\\/g, '/'); // Windows (safe generally?)

View File

@ -137,7 +137,7 @@ exports.abiwordAvailable = function()
{
return "no";
}
}
};
exports.reloadSettings = function reloadSettings() {
// Discover where the settings file lives
@ -157,7 +157,7 @@ exports.reloadSettings = function reloadSettings() {
try {
if(settingsStr) {
settings = vm.runInContext('exports = '+settingsStr, vm.createContext(), "settings.json");
settings = JSON.parse(JSON.stringify(settings)) // fix objects having constructors of other vm.context
settings = JSON.parse(JSON.stringify(settings)); // fix objects having constructors of other vm.context
}
}catch(e){
console.error('There was an error processing your settings.json file: '+e.message);
@ -196,9 +196,9 @@ exports.reloadSettings = function reloadSettings() {
}
if(exports.dbType === "dirty"){
console.warn("DirtyDB is used. This is fine for testing but not recommended for production.")
console.warn("DirtyDB is used. This is fine for testing but not recommended for production.");
}
}
};
// initially load settings
exports.reloadSettings();

View File

@ -23,7 +23,7 @@ var util = require('util');
var settings = require('./Settings');
var semver = require('semver');
var existsSync = (semver.satisfies(process.version, '>=0.8.0')) ? fs.existsSync : path.existsSync
var existsSync = (semver.satisfies(process.version, '>=0.8.0')) ? fs.existsSync : path.existsSync;
var CACHE_DIR = path.normalize(path.join(settings.root, 'var/'));
CACHE_DIR = existsSync(CACHE_DIR) ? CACHE_DIR : undefined;
@ -133,7 +133,7 @@ CachingMiddleware.prototype = new function () {
old_res.write = res.write;
old_res.end = res.end;
res.write = function(data, encoding) {};
res.end = function(data, encoding) { respond() };
res.end = function(data, encoding) { respond(); };
} else {
res.writeHead(status, headers);
}

View File

@ -68,7 +68,7 @@ PadDiff.prototype._isClearAuthorship = function(changeset){
return false;
return true;
}
};
PadDiff.prototype._createClearAuthorship = function(rev, callback){
var self = this;
@ -84,7 +84,7 @@ PadDiff.prototype._createClearAuthorship = function(rev, callback){
callback(null, changeset);
});
}
};
PadDiff.prototype._createClearStartAtext = function(rev, callback){
var self = this;
@ -107,7 +107,7 @@ PadDiff.prototype._createClearStartAtext = function(rev, callback){
callback(null, newAText);
});
});
}
};
PadDiff.prototype._getChangesetsInBulk = function(startRev, count, callback) {
var self = this;
@ -124,7 +124,7 @@ PadDiff.prototype._getChangesetsInBulk = function(startRev, count, callback) {
async.forEach(revisions, function(rev, callback){
self._pad.getRevision(rev, function(err, revision){
if(err){
return callback(err)
return callback(err);
}
var arrayNum = rev-startRev;
@ -137,7 +137,7 @@ PadDiff.prototype._getChangesetsInBulk = function(startRev, count, callback) {
}, function(err){
callback(err, changesets, authors);
});
}
};
PadDiff.prototype._addAuthors = function(authors) {
var self = this;
@ -147,7 +147,7 @@ PadDiff.prototype._addAuthors = function(authors) {
self._authors.push(author);
}
});
}
};
PadDiff.prototype._createDiffAtext = function(callback) {
var self = this;
@ -219,7 +219,7 @@ PadDiff.prototype._createDiffAtext = function(callback) {
}
);
});
}
};
PadDiff.prototype.getHtml = function(callback){
//cache the html
@ -279,7 +279,7 @@ PadDiff.prototype.getAuthors = function(callback){
} else {
callback(null, self._authors);
}
}
};
PadDiff.prototype._extendChangesetWithAuthor = function(changeset, author, apool) {
//unpack
@ -312,7 +312,7 @@ PadDiff.prototype._extendChangesetWithAuthor = function(changeset, author, apool
//return the modified changeset
return Changeset.pack(unpacked.oldLen, unpacked.newLen, assem.toString(), unpacked.charBank);
}
};
//this method is 80% like Changeset.inverse. I just changed so instead of reverting, it adds deletions and attribute changes to to the atext.
PadDiff.prototype._createDeletionChangeset = function(cs, startAText, apool) {
@ -463,7 +463,7 @@ PadDiff.prototype._createDeletionChangeset = function(cs, startAText, apool) {
// If the text this operator applies to is only a star, than this is a false positive and should be ignored
if (csOp.attribs && textBank != "*") {
var deletedAttrib = apool.putAttrib(["removed", true]);
var authorAttrib = apool.putAttrib(["author", ""]);;
var authorAttrib = apool.putAttrib(["author", ""]);
attribKeys.length = 0;
attribValues.length = 0;
@ -473,7 +473,7 @@ PadDiff.prototype._createDeletionChangeset = function(cs, startAText, apool) {
if(apool.getAttribKey(n) === "author"){
authorAttrib = n;
};
}
});
var undoBackToAttribs = cachedStrFunc(function (attribs) {