|
@ -96,14 +96,9 @@ ParserInline.prototype.skipToken = function (state) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
state.pos++; |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
// If nesting level exceeded - skip tail to the end. That's not ordinary
|
|
|
|
|
|
// situation and we should not care about content.
|
|
|
|
|
|
state.pos = state.max; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
state.pos++; |
|
|
state.cacheSet(pos, state.pos); |
|
|
state.cacheSet(pos, state.pos); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
@ -118,13 +113,6 @@ ParserInline.prototype.tokenize = function (state) { |
|
|
maxNesting = state.md.options.maxNesting; |
|
|
maxNesting = state.md.options.maxNesting; |
|
|
|
|
|
|
|
|
while (state.pos < end) { |
|
|
while (state.pos < end) { |
|
|
|
|
|
|
|
|
// If nesting level exceeded - skip tail to the end. That's not ordinary
|
|
|
|
|
|
// situation and we should not care about content.
|
|
|
|
|
|
if (state.level >= maxNesting) { |
|
|
|
|
|
state.pos = end; |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
// Try all possible rules.
|
|
|
// Try all possible rules.
|
|
|
// On success, rule should:
|
|
|
// On success, rule should:
|
|
|
//
|
|
|
//
|
|
@ -132,9 +120,11 @@ ParserInline.prototype.tokenize = function (state) { |
|
|
// - update `state.tokens`
|
|
|
// - update `state.tokens`
|
|
|
// - return true
|
|
|
// - return true
|
|
|
|
|
|
|
|
|
for (i = 0; i < len; i++) { |
|
|
if (state.level < maxNesting) { |
|
|
ok = rules[i](state, false); |
|
|
for (i = 0; i < len; i++) { |
|
|
if (ok) { break; } |
|
|
ok = rules[i](state, false); |
|
|
|
|
|
if (ok) { break; } |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (ok) { |
|
|
if (ok) { |
|
|