This commit is contained in:
Christopher Jeffrey 2011-08-15 20:42:41 -05:00
parent 6c6d91f24e
commit 0c32160f95

View File

@ -247,8 +247,7 @@ inline.lexer = function(str) {
, links = tokens.links , links = tokens.links
, link = {} , link = {}
, text , text
, href , href;
, val;
var rules = inline var rules = inline
, keys = inline.keys , keys = inline.keys
@ -299,9 +298,9 @@ inline.lexer = function(str) {
if (key === 'reflink') { if (key === 'reflink') {
link = links[cap[2]]; link = links[cap[2]];
} else { } else {
val = cap[2].match(/^([^\s]+)\s*(.+)?/); text = cap[2].match(/^([^\s]+)\s*(.+)?/);
link.href = val[1]; link.href = text[1];
link.title = val[2]; link.title = text[2];
} }
out += '<img src="' out += '<img src="'
+ escape(link.href) + escape(link.href)