From d6fb68f009d5a1f502b1899ed9fcb1951e6a479a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8C=AF=E4=BA=91=20=28Percy=29?= <464095417@qq.com> Date: Thu, 28 Dec 2017 09:34:37 +0800 Subject: [PATCH] =?UTF-8?q?[bugfix]=E6=B7=BB=E5=8A=A0=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E4=B8=93=E7=94=A8=E7=9A=84=E6=91=98=E8=A6=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用article.Summary 在渲染的时候,会因为分行的问题,导致渲染失败 --- routes/blog.js | 1 + 1 file changed, 1 insertion(+) diff --git a/routes/blog.js b/routes/blog.js index cdfc8c3..8f4c91b 100644 --- a/routes/blog.js +++ b/routes/blog.js @@ -254,6 +254,7 @@ router.get('/:category/:article', function (req, res, next) { ViewCount: article.ViewCount, LabelList: labelList, Summary: article.Summary, + Summary_share:article.Summary.replace(/\r\n/g,"。"), Content: article.Content }; res.render('blog/article', {