mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
split long log lines
This commit is contained in:
parent
08a2d28a99
commit
ba1115376f
1 changed files with 11 additions and 1 deletions
|
@ -72,8 +72,18 @@ $(function(){
|
|||
space+=" ";
|
||||
}
|
||||
|
||||
var splitedText = "";
|
||||
_(text.split("\n")).each(function(line){
|
||||
while(line.length > 0){
|
||||
var split = line.substr(0,100);
|
||||
line = line.substr(100);
|
||||
if(splitedText.length > 0) splitedText+="\n";
|
||||
splitedText += split;
|
||||
}
|
||||
});
|
||||
|
||||
//indent all lines with the given amount of space
|
||||
var newText = _(text.split("\n")).map(function(line){
|
||||
var newText = _(splitedText.split("\n")).map(function(line){
|
||||
return space + line;
|
||||
}).join("\\n");
|
||||
|
||||
|
|
Loading…
Reference in a new issue