From ba1115376f9582a67c190d718151de333082bd65 Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Sat, 3 Nov 2012 18:14:54 +0000 Subject: [PATCH] split long log lines --- tests/frontend/runner.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/frontend/runner.js b/tests/frontend/runner.js index f5cadcb7..0a5491f9 100644 --- a/tests/frontend/runner.js +++ b/tests/frontend/runner.js @@ -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");