|
|
@ -5,7 +5,7 @@ |
|
|
|
var isSpace = require('../common/utils').isSpace; |
|
|
|
|
|
|
|
|
|
|
|
// Search `[-+*][\n ]`, returns next pos arter marker on success
|
|
|
|
// Search `[-+*][\n ]`, returns next pos after marker on success
|
|
|
|
// or -1 on fail.
|
|
|
|
function skipBulletListMarker(state, startLine) { |
|
|
|
var marker, pos, max, ch; |
|
|
@ -33,7 +33,7 @@ function skipBulletListMarker(state, startLine) { |
|
|
|
return pos; |
|
|
|
} |
|
|
|
|
|
|
|
// Search `\d+[.)][\n ]`, returns next pos arter marker on success
|
|
|
|
// Search `\d+[.)][\n ]`, returns next pos after marker on success
|
|
|
|
// or -1 on fail.
|
|
|
|
function skipOrderedListMarker(state, startLine) { |
|
|
|
var ch, |
|
|
@ -210,12 +210,10 @@ module.exports = function list(state, startLine, endLine, silent) { |
|
|
|
while (pos < max) { |
|
|
|
ch = state.src.charCodeAt(pos); |
|
|
|
|
|
|
|
if (isSpace(ch)) { |
|
|
|
if (ch === 0x09) { |
|
|
|
offset += 4 - (offset + state.bsCount[nextLine]) % 4; |
|
|
|
} else { |
|
|
|
offset++; |
|
|
|
} |
|
|
|
if (ch === 0x09) { |
|
|
|
offset += 4 - (offset + state.bsCount[nextLine]) % 4; |
|
|
|
} else if (ch === 0x20) { |
|
|
|
offset++; |
|
|
|
} else { |
|
|
|
break; |
|
|
|
} |
|
|
@ -316,7 +314,7 @@ module.exports = function list(state, startLine, endLine, silent) { |
|
|
|
if (markerCharCode !== state.src.charCodeAt(posAfterMarker - 1)) { break; } |
|
|
|
} |
|
|
|
|
|
|
|
// Finilize list
|
|
|
|
// Finalize list
|
|
|
|
if (isOrdered) { |
|
|
|
token = state.push('ordered_list_close', 'ol', -1); |
|
|
|
} else { |
|
|
|