diff --git a/lib/marked.js b/lib/marked.js index 762a2137..93071828 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -124,7 +124,7 @@ block.token = function(str, tokens) { type: 'list_start', ordered: isFinite(cap[2]) }); - loose = /\n *\n *(?:\*|\+|-|\d+\.)/.test(cap[0]); + loose = /\n *\n *(?:[*+-]|\d+\.)/.test(cap[0]); // get each top-level item cap = cap[0].match( /^( *)([*+-]|\d+\.)[^\n]*(?:\n(?!\1(?:\2|\d+\.))[^\n]*)*/gm @@ -132,7 +132,7 @@ block.token = function(str, tokens) { each(cap, function(item) { // remove the list items sigil // so its seen as the next token - item = item.replace(/^ *(\*|\+|-|\d+\.) */, ''); + item = item.replace(/^ *([*+-]|\d+\.) */, ''); // outdent whatever the // list item contains, hacky var space = /\n( +)/.exec(item);