Allow blank lines

git-svn-id: https://shellinabox.googlecode.com/svn/trunk@98 0da03de8-d603-11dd-86c2-0f8696b7b6f9
This commit is contained in:
zodiac 2009-03-30 09:20:02 +00:00
parent e7db6d64e2
commit f21ffb934f

View file

@ -218,7 +218,9 @@ Demo.prototype.doCommand = function() {
this.gotoState(STATE_PROMPT);
var tokens = new Tokens(this.line);
this.line = '';
var cmd = tokens.nextToken().toUpperCase();
var cmd = tokens.nextToken();
if (cmd != undefined) {
cmd = cmd.toUpperCase();
if (cmd.match(/^[0-9]+$/)) {
tokens.removeLineNumber();
var lineNumber = parseInt(cmd);
@ -243,6 +245,7 @@ Demo.prototype.doCommand = function() {
this.gotoState(STATE_EVAL);
}
tokens.reset();
}
};
Demo.prototype.doEval = function() {