mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-06-17 19:54:50 -04:00
Remove trailing whitespaces
Hoping to minimize future diffs. Not touching vendorized libraries.
This commit is contained in:
parent
1cb9c3e1ce
commit
dc7e49f89d
28 changed files with 165 additions and 165 deletions
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue