fix(compiler): link

This commit is contained in:
qingwei.li 2017-02-19 15:06:21 +08:00
commit 3b127a161c

View file

@ -73,7 +73,10 @@ renderer.link = function (href, title, text) {
} else { } else {
blank = ' target="_blank"' blank = ' target="_blank"'
} }
return `<a href="${href}" title="${title || text}"${blank}>${text}</a>` if (title) {
title = ` title="${title}"`
}
return `<a href="${href}"${title}${blank}>${text}</a>`
} }
renderer.paragraph = function (text) { renderer.paragraph = function (text) {
if (/^!&gt;/.test(text)) { if (/^!&gt;/.test(text)) {