cleanup again
This commit is contained in:
parent
aab61affb3
commit
b73907b6c8
@ -25,10 +25,6 @@ var block = {
|
||||
blockquote: /^ *>[^\n]*(?:\n *>[^\n]*)*/,
|
||||
|
||||
|
||||
// fastest with loose list support
|
||||
// list: /^( *)(\*|\+|-|\d+\.)[^\n]*(?:\n[^\n]+|\n{2}\1\2[^\n]*)*/,
|
||||
|
||||
// fix ordered lists:
|
||||
//list: /^( *)([*+-]|\d+\.) [^\n]*(?:\n[^\n]+|\n{2}\1(?:\2|\d+\.)[^\n]*)*/,
|
||||
|
||||
// test
|
||||
@ -38,7 +34,7 @@ var block = {
|
||||
//html: /^<([^\/\s>]+)[^\n>]*>[^\n]*(?:\n[^\n]+)*\n?<\/\1>/,
|
||||
|
||||
// account for single tags
|
||||
html: /^<[^>\n]+> *(?:\n{2}|$)|^<([^\/\s>]+)[^\n>]*>[^\n]*(?:\n[^\n]+)*\n?<\/\1>/,
|
||||
html: /^<[^>\n]+> *(?:\n{2}|\s*$)|^<([^\/\s>]+)[^\n>]*>[^\n]*(?:\n[^\n]+)*\n?<\/\1>/,
|
||||
|
||||
|
||||
text: /^[^\n]+/
|
||||
@ -291,15 +287,15 @@ inline.lexer = function(str) {
|
||||
case 'link':
|
||||
case 'reflink':
|
||||
if (key === 'reflink') {
|
||||
link = links[cap[2]] || links[cap[1]];
|
||||
link = cap[2]
|
||||
? links[cap[2]]
|
||||
: links[cap[1]];
|
||||
if (!link) {
|
||||
// apparently markdown says you're
|
||||
// supposed to do this ...?
|
||||
out += cap[0];
|
||||
break;
|
||||
}
|
||||
//if (!link) throw new
|
||||
// Error('Undefined Reference: ' + cap[2]);
|
||||
} else {
|
||||
text = /^\s*([^\s]*)(?:\s+"([^"]+)")?\s*$/.exec(cap[2]);
|
||||
link = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user