From 7e61fb3aa4684a3df8e171265f544e0918565862 Mon Sep 17 00:00:00 2001 From: yanglbme Date: Sun, 7 Nov 2021 21:41:51 +0800 Subject: [PATCH] feat: support customize ext link style (#74) close #74 --- src/assets/scripts/renderers/wx-renderer.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/assets/scripts/renderers/wx-renderer.js b/src/assets/scripts/renderers/wx-renderer.js index dc4ff88..c53b72c 100644 --- a/src/assets/scripts/renderers/wx-renderer.js +++ b/src/assets/scripts/renderers/wx-renderer.js @@ -179,11 +179,14 @@ class WxRenderer { "wx_link" )}>${text}`; } - if (href === text || !status) { + if (href === text) { return text; } - let ref = addFootnote(title || text, href); - return `${text}[${ref}]`; + if (status) { + let ref = addFootnote(title || text, href); + return `${text}[${ref}]`; + } + return `${text}`; }; renderer.strong = (text) => `${text}`;