Skip to content

Commit

Permalink
feat: support customize ext link style (#74)
Browse files Browse the repository at this point in the history
close #74
  • Loading branch information
yanglbme committed Nov 7, 2021
1 parent 5175819 commit 7e61fb3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/assets/scripts/renderers/wx-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,14 @@ class WxRenderer {
"wx_link"
)}>${text}</a>`;
}
if (href === text || !status) {
if (href === text) {
return text;
}
let ref = addFootnote(title || text, href);
return `<span ${getStyles("link")}>${text}<sup>[${ref}]</sup></span>`;
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>`;
Expand Down

0 comments on commit 7e61fb3

Please sign in to comment.