summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorportix <none@none>2013-02-25 17:33:47 +0100
committerportix <none@none>2013-02-25 17:33:47 +0100
commit4135423628e5d83fa2715d286a5a8b9eacd27090 (patch)
tree2900025ad2de586930dbeaeff0c9396ed1a54769 /scripts
parenta3f52da4ba27a1634b484409c46ab70228397ba4 (diff)
downloaddwb-4135423628e5d83fa2715d286a5a8b9eacd27090.zip
Format source code view in debug; fixing typo in documentation
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/io.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/lib/io.js b/scripts/lib/io.js
index 9050abb6..4f1686c1 100644
--- a/scripts/lib/io.js
+++ b/scripts/lib/io.js
@@ -5,13 +5,14 @@
var prefixStack = "\n==> DEBUG [STACK] : ";
var prefixArguments = "\n==> DEBUG [ARGUMENTS] : ";
var prefixCaller = "\n==> DEBUG [CALLER]";
- var prefixSource = "\n==> DEBUG [SOURCE] : \n";
+ var prefixSource = "\n==> DEBUG [SOURCE]\n";
var prefixFunction = "\n------>";
var regHasDwb = new RegExp("[^]*/\\*<dwb\\*/([^]*)/\\*dwb>\\*/[^]*");
+ var prefixEditor = " ";
var formatLine = function(line, max)
{
var size = max - Math.ceil(Math.log(line+1)/Math.log(10)) + 1;
- return Array(size).join(" ") + line + " > ";
+ return prefixEditor + Array(size).join(" ") + line + " > ";
};
Object.defineProperties(io, {
@@ -93,7 +94,7 @@
if (length >= line-3 && line-3 >= 0)
{
if (length >= line-4)
- outMessage += "...\n";
+ outMessage += prefixEditor + "...\n";
outMessage += formatLine(line-1, max) + source[line-3] + "\n";
}
else
@@ -104,12 +105,12 @@
{
outMessage += formatLine(line+1, max) + source[line-1];
if (length > line + 1)
- outMessage += "\n...";
+ outMessage += "\n" + prefixEditor + "...";
else
- outMessage += "\nEOF";
+ outMessage += "\n" + prefixEditor + "EOF";
}
else
- outMessage += "EOF";
+ outMessage += prefixEditor + "EOF";
}
else if (params.arguments)
{