This commit is contained in:
Christopher Jeffrey 2011-08-14 01:04:35 -05:00
parent 68157a29b4
commit ea1a4043a4

View File

@ -136,10 +136,7 @@ block.token = function lex(str, tokens, line) {
var scan = function() {
if (!str) return;
var i = 0;
for (; i < len; i++) {
for (var i = 0; i < len; i++) {
key = keys[i];
if (cap = rules[key].exec(str)) {
str = str.substring(cap[0].length);
@ -148,7 +145,7 @@ block.token = function lex(str, tokens, line) {
}
};
while (scan())
while (scan()) {
switch (key) {
case 'newline':
line++;
@ -250,6 +247,7 @@ block.token = function lex(str, tokens, line) {
});
break;
}
}
return tokens;
};
@ -302,10 +300,7 @@ inline.lexer = function(str) {
var scan = function() {
if (!str) return;
var i = 0;
for (; i < len; i++) {
for (var i = 0; i < len; i++) {
key = keys[i];
if (cap = rules[key].exec(str)) {
str = str.substring(cap[0].length);
@ -314,7 +309,7 @@ inline.lexer = function(str) {
}
};
while (scan())
while (scan()) {
switch (key) {
case 'tag':
out += cap[0];
@ -379,6 +374,7 @@ inline.lexer = function(str) {
default:
break;
}
}
return out;
};