|
@ -93,6 +93,19 @@ ParserInline.prototype.skipToken = function (state) { |
|
|
|
|
|
|
|
|
if (ok) { break; } |
|
|
if (ok) { break; } |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
// Too much nesting, just skip until the end of the paragraph.
|
|
|
|
|
|
//
|
|
|
|
|
|
// NOTE: this will cause links to behave incorrectly in the following case,
|
|
|
|
|
|
// when an amount of `[` is exactly equal to `maxNesting + 1`:
|
|
|
|
|
|
//
|
|
|
|
|
|
// [[[[[[[[[[[[[[[[[[[[[foo]()
|
|
|
|
|
|
//
|
|
|
|
|
|
// TODO: remove this workaround when CM standard will allow nested links
|
|
|
|
|
|
// (we can replace it by preventing links from being parsed in
|
|
|
|
|
|
// validation mode)
|
|
|
|
|
|
//
|
|
|
|
|
|
state.pos = state.posMax; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!ok) { state.pos++; } |
|
|
if (!ok) { state.pos++; } |
|
|