From e11b6b8f756a86f9f5061b0429c902b14503795b Mon Sep 17 00:00:00 2001 From: Jonas Westerlund Date: Wed, 4 Jul 2012 22:55:54 +0200 Subject: [PATCH] Remove octal escape sequences and avoid reserved keyword Both are errors in strict mode. --- lib/_debugger.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/_debugger.js b/lib/_debugger.js index bb108347d4..c39a0ba58e 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -40,7 +40,7 @@ exports.start = function(argv, stdin, stdout) { stdout = stdout || process.stdout; var args = ['--debug-brk'].concat(argv), - interface = new Interface(stdin, stdout, args); + interface_ = new Interface(stdin, stdout, args); stdin.resume(); @@ -49,7 +49,7 @@ exports.start = function(argv, stdin, stdout) { 'Please report this bug.'); console.error(e.message); console.error(e.stack); - if (interface.child) interface.child.kill(); + if (interface_.child) interface_.child.kill(); process.exit(1); }); }; @@ -700,7 +700,7 @@ function SourceUnderline(sourceText, position, repl) { // Colourize char if stdout supports colours if (repl.useColors) { - tail = tail.replace(/(.+?)([^\w]|$)/, '\033[32m$1\033[39m$2'); + tail = tail.replace(/(.+?)([^\w]|$)/, '\u001b[32m$1\u001b[39m$2'); } // Return source line with coloured char at `position`