From d35b21e9b24e3f60a158f75afba1156e699a14fb Mon Sep 17 00:00:00 2001 From: David Majda Date: Mon, 16 Apr 2012 15:29:04 +0200 Subject: [PATCH] Simplify the |indent| function in /test/run --- test/run | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/run b/test/run index 5ec8f0d..849d616 100755 --- a/test/run +++ b/test/run @@ -12,9 +12,7 @@ function message(s) { return "\u001B[35m" + s + "\u001B[39m"; }; function ok(s) { return "\u001B[32m" + s + "\u001B[39m"; }; function error(s) { return "\u001B[31m" + s + "\u001B[39m"; }; -function indent(s) { - return s.split("\n").map(function(line) { return " " + line; }).join("\n"); -} +function indent(s) { return s.replace(/^/gm, " "); } QUnit.init(); QUnit.config.blocking = true;