consistent regexes
This commit is contained in:
parent
7efff84224
commit
142bca520a
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user