|
@ -139,6 +139,7 @@ module.exports = function list(state, startLine, endLine, silent) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
token.map = listLines = [ startLine, 0 ]; |
|
|
token.map = listLines = [ startLine, 0 ]; |
|
|
|
|
|
token.markup = String.fromCharCode(markerCharCode); |
|
|
|
|
|
|
|
|
//
|
|
|
//
|
|
|
// Iterate list items
|
|
|
// Iterate list items
|
|
@ -169,6 +170,7 @@ module.exports = function list(state, startLine, endLine, silent) { |
|
|
|
|
|
|
|
|
// Run subparser & write tokens
|
|
|
// Run subparser & write tokens
|
|
|
token = state.push('list_item_open', 'li', 1); |
|
|
token = state.push('list_item_open', 'li', 1); |
|
|
|
|
|
token.markup = String.fromCharCode(markerCharCode); |
|
|
token.map = itemLines = [ startLine, 0 ]; |
|
|
token.map = itemLines = [ startLine, 0 ]; |
|
|
|
|
|
|
|
|
oldIndent = state.blkIndent; |
|
|
oldIndent = state.blkIndent; |
|
@ -196,6 +198,7 @@ module.exports = function list(state, startLine, endLine, silent) { |
|
|
state.parentType = oldParentType; |
|
|
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; |
|
|
nextLine = startLine = state.line; |
|
|
itemLines[1] = nextLine; |
|
|
itemLines[1] = nextLine; |
|
@ -236,12 +239,13 @@ module.exports = function list(state, startLine, endLine, silent) { |
|
|
|
|
|
|
|
|
// Finilize list
|
|
|
// Finilize list
|
|
|
if (isOrdered) { |
|
|
if (isOrdered) { |
|
|
state.push('ordered_list_close', 'ol', -1); |
|
|
token = state.push('ordered_list_close', 'ol', -1); |
|
|
} else { |
|
|
} 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; |
|
|
state.line = nextLine; |
|
|
|
|
|
|
|
|
// mark paragraphs tight if needed
|
|
|
// mark paragraphs tight if needed
|
|
|