Fix: let makeAuthor use makeLink

This commit is contained in:
eight 2017-10-12 16:15:45 +08:00
parent 40ad7837fc
commit 33607e74a7

View File

@ -101,11 +101,7 @@
const [, name, email, url] = match;
const frag = document.createDocumentFragment();
if (email) {
frag.appendChild($element({
tag: 'a',
textContent: name,
href: `mailto:${email}`
}));
frag.appendChild(makeLink(`mailto:${email}`, name));
} else {
frag.appendChild($element({
tag: 'span',
@ -113,17 +109,14 @@
}));
}
if (url) {
frag.appendChild($element({
tag: 'a',
href: url,
target: '_blank',
rel: 'noopener',
appendChild: $element({
frag.appendChild(makeLink(
url,
$element({
tag: 'img',
className: 'icon',
src: '/install-usercss/external.svg'
})
}));
));
}
return frag;
}