feat: support customize ext link style (#74)

close #74
This commit is contained in:
yanglbme 2021-11-07 21:41:51 +08:00
parent 51758190e5
commit 7e61fb3aa4

View File

@ -179,11 +179,14 @@ class WxRenderer {
"wx_link"
)}>${text}</a>`;
}
if (href === text || !status) {
if (href === text) {
return text;
}
if (status) {
let ref = addFootnote(title || text, href);
return `<span ${getStyles("link")}>${text}<sup>[${ref}]</sup></span>`;
}
return `<span ${getStyles("link")}>${text}</span>`;
};
renderer.strong = (text) =>
`<strong ${getStyles("strong")}>${text}</strong>`;