|
|
@ -138,7 +138,8 @@ module.exports = function list(state, startLine, endLine, silent) { |
|
|
|
token = state.push('bullet_list_open', 'ul', 1); |
|
|
|
} |
|
|
|
|
|
|
|
token.map = listLines = [ startLine, 0 ]; |
|
|
|
token.map = listLines = [ startLine, 0 ]; |
|
|
|
token.markup = String.fromCharCode(markerCharCode); |
|
|
|
|
|
|
|
//
|
|
|
|
// Iterate list items
|
|
|
@ -168,8 +169,9 @@ module.exports = function list(state, startLine, endLine, silent) { |
|
|
|
indent = (posAfterMarker - state.bMarks[nextLine]) + indentAfterMarker; |
|
|
|
|
|
|
|
// Run subparser & write tokens
|
|
|
|
token = state.push('list_item_open', 'li', 1); |
|
|
|
token.map = itemLines = [ startLine, 0 ]; |
|
|
|
token = state.push('list_item_open', 'li', 1); |
|
|
|
token.markup = String.fromCharCode(markerCharCode); |
|
|
|
token.map = itemLines = [ startLine, 0 ]; |
|
|
|
|
|
|
|
oldIndent = state.blkIndent; |
|
|
|
oldTight = state.tight; |
|
|
@ -195,7 +197,8 @@ module.exports = function list(state, startLine, endLine, silent) { |
|
|
|
state.tight = oldTight; |
|
|
|
state.parentType = oldParentType; |
|
|
|
|
|
|
|
token = state.push('list_item_close', 'li', -1); |
|
|
|
token = state.push('list_item_close', 'li', -1); |
|
|
|
token.markup = String.fromCharCode(markerCharCode); |
|
|
|
|
|
|
|
nextLine = startLine = state.line; |
|
|
|
itemLines[1] = nextLine; |
|
|
@ -236,12 +239,13 @@ module.exports = function list(state, startLine, endLine, silent) { |
|
|
|
|
|
|
|
// Finilize list
|
|
|
|
if (isOrdered) { |
|
|
|
state.push('ordered_list_close', 'ol', -1); |
|
|
|
token = state.push('ordered_list_close', 'ol', -1); |
|
|
|
} else { |
|
|
|
state.push('bullet_list_close', 'ul', -1); |
|
|
|
token = state.push('bullet_list_close', 'ul', -1); |
|
|
|
} |
|
|
|
listLines[1] = nextLine; |
|
|
|
token.markup = String.fromCharCode(markerCharCode); |
|
|
|
|
|
|
|
listLines[1] = nextLine; |
|
|
|
state.line = nextLine; |
|
|
|
|
|
|
|
// mark paragraphs tight if needed
|
|
|
|