From 1f07dd39c67489e1acd5cf265049b0f94c542c4f Mon Sep 17 00:00:00 2001 From: yanglbme Date: Mon, 22 Jun 2020 17:30:42 +0800 Subject: [PATCH] fix: update wx-renderer.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复图片渲染多出上下空行的问题 --- src/scripts/renderers/wx-renderer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scripts/renderers/wx-renderer.js b/src/scripts/renderers/wx-renderer.js index f7b239d..9a96767 100644 --- a/src/scripts/renderers/wx-renderer.js +++ b/src/scripts/renderers/wx-renderer.js @@ -112,7 +112,10 @@ const WxRenderer = function (opts) { } } renderer.paragraph = text => { - return text.replace(/ /g, '') === '' ? '' : `

${text}

` + if (text.indexOf('${text}

` } renderer.blockquote = text => {