|
@ -10,7 +10,6 @@ module.exports = function blockquote(state, startLine, endLine, silent) { |
|
|
ch, |
|
|
ch, |
|
|
i, |
|
|
i, |
|
|
initial, |
|
|
initial, |
|
|
isOutdented, |
|
|
|
|
|
l, |
|
|
l, |
|
|
lastLineEmpty, |
|
|
lastLineEmpty, |
|
|
lines, |
|
|
lines, |
|
@ -26,6 +25,7 @@ module.exports = function blockquote(state, startLine, endLine, silent) { |
|
|
terminate, |
|
|
terminate, |
|
|
terminatorRules, |
|
|
terminatorRules, |
|
|
token, |
|
|
token, |
|
|
|
|
|
wasOutdented, |
|
|
oldLineMax = state.lineMax, |
|
|
oldLineMax = state.lineMax, |
|
|
pos = state.bMarks[startLine] + state.tShift[startLine], |
|
|
pos = state.bMarks[startLine] + state.tShift[startLine], |
|
|
max = state.eMarks[startLine]; |
|
|
max = state.eMarks[startLine]; |
|
@ -106,6 +106,7 @@ module.exports = function blockquote(state, startLine, endLine, silent) { |
|
|
|
|
|
|
|
|
oldParentType = state.parentType; |
|
|
oldParentType = state.parentType; |
|
|
state.parentType = 'blockquote'; |
|
|
state.parentType = 'blockquote'; |
|
|
|
|
|
wasOutdented = false; |
|
|
|
|
|
|
|
|
// Search the end of the block
|
|
|
// Search the end of the block
|
|
|
//
|
|
|
//
|
|
@ -134,7 +135,7 @@ module.exports = function blockquote(state, startLine, endLine, silent) { |
|
|
// > current blockquote
|
|
|
// > current blockquote
|
|
|
// 2. checking this line
|
|
|
// 2. checking this line
|
|
|
// ```
|
|
|
// ```
|
|
|
isOutdented = state.sCount[nextLine] < state.blkIndent; |
|
|
if (state.sCount[nextLine] < state.blkIndent) wasOutdented = true; |
|
|
|
|
|
|
|
|
pos = state.bMarks[nextLine] + state.tShift[nextLine]; |
|
|
pos = state.bMarks[nextLine] + state.tShift[nextLine]; |
|
|
max = state.eMarks[nextLine]; |
|
|
max = state.eMarks[nextLine]; |
|
@ -144,7 +145,7 @@ module.exports = function blockquote(state, startLine, endLine, silent) { |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (state.src.charCodeAt(pos++) === 0x3E/* > */ && !isOutdented) { |
|
|
if (state.src.charCodeAt(pos++) === 0x3E/* > */ && !wasOutdented) { |
|
|
// This line is inside the blockquote.
|
|
|
// This line is inside the blockquote.
|
|
|
|
|
|
|
|
|
// skip spaces after ">" and re-calculate offset
|
|
|
// skip spaces after ">" and re-calculate offset
|
|
@ -244,8 +245,6 @@ module.exports = function blockquote(state, startLine, endLine, silent) { |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (isOutdented) break; |
|
|
|
|
|
|
|
|
|
|
|
oldBMarks.push(state.bMarks[nextLine]); |
|
|
oldBMarks.push(state.bMarks[nextLine]); |
|
|
oldBSCount.push(state.bsCount[nextLine]); |
|
|
oldBSCount.push(state.bsCount[nextLine]); |
|
|
oldTShift.push(state.tShift[nextLine]); |
|
|
oldTShift.push(state.tShift[nextLine]); |
|
|