|
|
@ -96,14 +96,9 @@ ParserInline.prototype.skipToken = function (state) { |
|
|
|
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); |
|
|
|
}; |
|
|
|
|
|
|
@ -118,13 +113,6 @@ ParserInline.prototype.tokenize = function (state) { |
|
|
|
maxNesting = state.md.options.maxNesting; |
|
|
|
|
|
|
|
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.
|
|
|
|
// On success, rule should:
|
|
|
|
//
|
|
|
@ -132,9 +120,11 @@ ParserInline.prototype.tokenize = function (state) { |
|
|
|
// - update `state.tokens`
|
|
|
|
// - return true
|
|
|
|
|
|
|
|
for (i = 0; i < len; i++) { |
|
|
|
ok = rules[i](state, false); |
|
|
|
if (ok) { break; } |
|
|
|
if (state.level < maxNesting) { |
|
|
|
for (i = 0; i < len; i++) { |
|
|
|
ok = rules[i](state, false); |
|
|
|
if (ok) { break; } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (ok) { |
|
|
|