Allow empty line to be a matching state.

This commit is contained in:
Chris Spencer 2011-05-18 12:26:41 -07:00
commit d1e05468c6

View file

@ -76,7 +76,7 @@ var Tokenizer = function(rules) {
var value = match[0];
for ( var i = 0; i < state.length; i++) {
if (match[i + 1]) {
if (match[i + 1] !== undefined) {
var rule = state[i];
if (typeof rule.token == "function")