bug已经修复

This commit is contained in:
joyqi 2013-11-20 20:10:19 +08:00
parent 94196d0af0
commit 26983314b0

View File

@ -279,16 +279,15 @@ Lexer.prototype.token = function(src, top) {
var lines = cap[0].split("\n"), len = -1;
for (var num = 0; num < lines.length; num ++) {
var line = lines[num];
console.log(line);
if (!line.match(/^( *)(bull) [\s\S]+?/)) {
if (!line.match(/^( *)(?:[*+-]|\d+\.) [\s\S]+?/) && !line.match(/^\s*$/)) {
break;
}
len += line.length + 1;
}
console.log(len, cap[0].length);
cap[0] = cap[0].substring(0, len);
src = src.substring(cap[0].length);
bull = cap[2];