|
@ -31,7 +31,8 @@ function skipBulletListMarker(state, startLine) { |
|
|
// or -1 on fail.
|
|
|
// or -1 on fail.
|
|
|
function skipOrderedListMarker(state, startLine) { |
|
|
function skipOrderedListMarker(state, startLine) { |
|
|
var ch, |
|
|
var ch, |
|
|
pos = state.bMarks[startLine] + state.tShift[startLine], |
|
|
start = state.bMarks[startLine] + state.tShift[startLine], |
|
|
|
|
|
pos = start, |
|
|
max = state.eMarks[startLine]; |
|
|
max = state.eMarks[startLine]; |
|
|
|
|
|
|
|
|
// List marker should have at least 2 chars (digit + dot)
|
|
|
// List marker should have at least 2 chars (digit + dot)
|
|
@ -48,6 +49,11 @@ function skipOrderedListMarker(state, startLine) { |
|
|
ch = state.src.charCodeAt(pos++); |
|
|
ch = state.src.charCodeAt(pos++); |
|
|
|
|
|
|
|
|
if (ch >= 0x30/* 0 */ && ch <= 0x39/* 9 */) { |
|
|
if (ch >= 0x30/* 0 */ && ch <= 0x39/* 9 */) { |
|
|
|
|
|
|
|
|
|
|
|
// List marker should have no more than 9 digits
|
|
|
|
|
|
// (prevents integer overflow in browsers)
|
|
|
|
|
|
if (pos - start >= 10) { return -1; } |
|
|
|
|
|
|
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|