Remove trailing whitespaces

Hoping to minimize future diffs. Not touching vendorized libraries.
This commit is contained in:
muxator 2019-04-16 00:34:29 +02:00
parent 1cb9c3e1ce
commit dc7e49f89d
28 changed files with 165 additions and 165 deletions

View file

@ -13,7 +13,7 @@ exports.createServer = function () {
console.log("Report bugs at https://github.com/ether/etherpad-lite/issues")
serverName = `Etherpad ${settings.getGitCommit()} (http://etherpad.org)`;
console.log(`Your Etherpad version is ${settings.getEpVersion()} (${settings.getGitCommit()})`);
exports.restartServer();
@ -45,7 +45,7 @@ exports.restartServer = function () {
console.log("SSL -- enabled");
console.log(`SSL -- server key file: ${settings.ssl.key}`);
console.log(`SSL -- Certificate Authority's certificate file: ${settings.ssl.cert}`);
var options = {
key: fs.readFileSync( settings.ssl.key ),
cert: fs.readFileSync( settings.ssl.cert )
@ -57,7 +57,7 @@ exports.restartServer = function () {
options.ca.push(fs.readFileSync(caFileName));
}
}
var https = require('https');
server = https.createServer(options, app);

View file

@ -8,7 +8,7 @@ var padMessageHandler = require("../../handler/PadMessageHandler");
var cookieParser = require('cookie-parser');
var sessionModule = require('express-session');
exports.expressCreateServer = function (hook_name, args, cb) {
//init socket.io and redirect all requests to the MessageHandler
// there shouldn't be a browser that isn't compatible to all
@ -57,7 +57,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
// no longer available, details available at:
// http://stackoverflow.com/questions/23981741/minify-socket-io-socket-io-js-with-1-0
// if(settings.minify) io.enable('browser client minification');
//Initalize the Socket.IO Router
socketIORouter.setSocketIO(io);
socketIORouter.addComponent("pad", padMessageHandler);

View file

@ -40,9 +40,9 @@ exports.expressCreateServer = function (hook_name, args, cb) {
var clientParts = _(plugins.parts)
.filter(function(part){ return _(part).has('client_hooks') });
var clientPlugins = {};
_(clientParts).chain()
.map(function(part){ return part.plugin })
.uniq()
@ -50,7 +50,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
clientPlugins[name] = _(plugins.plugins[name]).clone();
delete clientPlugins[name]['package'];
});
res.header("Content-Type","application/json; charset=utf-8");
res.write(JSON.stringify({"plugins": clientPlugins, "parts": clientParts}));
res.end();

View file

@ -113,7 +113,7 @@ var API = {
"response": {"groupIDs":{"type":"List", "items":{"type":"string"}}}
},
},
// Author
"author": {
"create" : {
@ -298,7 +298,7 @@ function capitalise(string){
for (var resource in API) {
for (var func in API[resource]) {
// The base response model
var responseModel = {
"properties": {
@ -350,7 +350,7 @@ function newSwagger() {
exports.expressCreateServer = function (hook_name, args, cb) {
for (var version in apiHandler.version) {
var swagger = newSwagger();
var basePath = "/rest/" + version;
@ -437,7 +437,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
};
swagger.configureSwaggerPaths("", "/api" , "");
swagger.configure("http://" + settings.ip + ":" + settings.port + basePath, version);
}
};

View file

@ -17,7 +17,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var spawn = require('child_process').spawn;
var async = require("async");
var settings = require("./Settings");
@ -34,7 +34,7 @@ if(os.type().indexOf("Windows") > -1)
{
//span an abiword process to perform the conversion
var abiword = spawn(settings.abiword, ["--to=" + task.destFile, task.srcFile]);
//delegate the processing of stdout to another function
abiword.stdout.on('data', function (data)
{
@ -43,7 +43,7 @@ if(os.type().indexOf("Windows") > -1)
});
//append error messages to the buffer
abiword.stderr.on('data', function (data)
abiword.stderr.on('data', function (data)
{
stdoutBuffer += data.toString();
});
@ -63,7 +63,7 @@ if(os.type().indexOf("Windows") > -1)
callback();
});
};
exports.convertFile = function(srcFile, destFile, type, callback)
{
doConvertTask({"srcFile": srcFile, "destFile": destFile, "type": type}, callback);
@ -79,16 +79,16 @@ else
var spawnAbiword = function (){
abiword = spawn(settings.abiword, ["--plugin", "AbiCommand"]);
var stdoutBuffer = "";
var firstPrompt = true;
var firstPrompt = true;
//append error messages to the buffer
abiword.stderr.on('data', function (data)
abiword.stderr.on('data', function (data)
{
stdoutBuffer += data.toString();
});
//abiword died, let's restart abiword and return an error with the callback
abiword.on('exit', function (code)
abiword.on('exit', function (code)
{
spawnAbiword();
stdoutCallback(`Abiword died with exit code ${code}`);
@ -105,10 +105,10 @@ else
{
//filter the feedback message
var err = stdoutBuffer.search("OK") != -1 ? null : stdoutBuffer;
//reset the buffer
stdoutBuffer = "";
//call the callback with the error message
//skip the first prompt
if(stdoutCallback != null && !firstPrompt)
@ -116,7 +116,7 @@ else
stdoutCallback(err);
stdoutCallback = null;
}
firstPrompt = false;
}
});
@ -138,7 +138,7 @@ else
}
};
};
//Queue with the converts we have to do
var queue = async.queue(doConvertTask, 1);
exports.convertFile = function(srcFile, destFile, type, callback)

View file

@ -331,12 +331,12 @@ function getHTMLFromAtext(pad, atext, authorColors)
nextLine = _analyzeLine(textLines[i + 1], attribLines[i + 1], apool);
}
hooks.aCallAll('getLineHTMLForExport', context);
//To create list parent elements
//To create list parent elements
if ((!prevLine || prevLine.listLevel !== line.listLevel) || (prevLine && line.listTypeName !== prevLine.listTypeName))
{
var exists = _.find(openLists, function (item)
{
return (item.level === line.listLevel && item.type === line.listTypeName);
return (item.level === line.listLevel && item.type === line.listTypeName);
});
if (!exists) {
var prevLevel = 0;
@ -365,7 +365,7 @@ function getHTMLFromAtext(pad, atext, authorColors)
{
pieces.push("<ul class=\"" + line.listTypeName + "\">");
}
}
}
}
}
@ -398,7 +398,7 @@ function getHTMLFromAtext(pad, atext, authorColors)
{
pieces.push("</li>");
}
if (line.listTypeName === "number")
{
pieces.push("</ol>");
@ -407,7 +407,7 @@ function getHTMLFromAtext(pad, atext, authorColors)
{
pieces.push("</ul>");
}
}
}
}
}
else//outside any list, need to close line.listLevel of lists

View file

@ -5,11 +5,11 @@ function customError(message, errorName)
{
this.name = errorName || "Error";
this.message = message;
var stackParts = new Error().stack.split("\n");
stackParts.splice(0,2);
stackParts.unshift(this.name + ": " + message);
this.stack = stackParts.join("\n");
}
customError.prototype = Error.prototype;