|
@ -3,12 +3,13 @@ |
|
|
'use strict'; |
|
|
'use strict'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var skipEmptyLines = require('../helpers').skipEmptyLines; |
|
|
var skipEmptyLines = require('../helpers').skipEmptyLines; |
|
|
var skipSpaces = require('../helpers').skipSpaces; |
|
|
var skipSpaces = require('../helpers').skipSpaces; |
|
|
|
|
|
var getLines = require('../helpers').getLines; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = function blockquote(state, startLine, endLine, silent) { |
|
|
module.exports = function blockquote(state, startLine, endLine, silent) { |
|
|
var marker, nextLine, oldBMarks, lastLineEmpty, |
|
|
var marker, nextLine, oldBMarks, lastLineEmpty, subState, |
|
|
rules_named = state.lexerBlock.rules_named, |
|
|
rules_named = state.lexerBlock.rules_named, |
|
|
pos = state.bMarks[startLine] + state.tShift[startLine], |
|
|
pos = state.bMarks[startLine] + state.tShift[startLine], |
|
|
max = state.eMarks[startLine]; |
|
|
max = state.eMarks[startLine]; |
|
@ -75,11 +76,10 @@ module.exports = function blockquote(state, startLine, endLine, silent) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
state.tokens.push({ type: 'blockquote_open' }); |
|
|
state.tokens.push({ type: 'blockquote_open' }); |
|
|
state.lexerInline.tokenize( |
|
|
|
|
|
state, |
|
|
subState = state.clone(getLines(state, startLine, nextLine, true).replace(/^ {0,3}> ?/mg, '')); |
|
|
state.bMarks[startLine], |
|
|
state.lexerBlock.tokenize(subState, 0, subState.lineMax); |
|
|
state.eMarks[nextLine - 1] |
|
|
|
|
|
); |
|
|
|
|
|
state.tokens.push({ type: 'blockquote_close' }); |
|
|
state.tokens.push({ type: 'blockquote_close' }); |
|
|
|
|
|
|
|
|
state.line = skipEmptyLines(state, nextLine); |
|
|
state.line = skipEmptyLines(state, nextLine); |
|
|