From 1b10121e6adff5080bb9b95e025663510c6311ad Mon Sep 17 00:00:00 2001 From: Maxi Gimenez Date: Mon, 19 Oct 2020 18:24:37 +0200 Subject: [PATCH] fix: remove markdown from content then slice --- index.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 395869f1..a84cffa8 100644 --- a/index.js +++ b/index.js @@ -137,12 +137,9 @@ module.exports = themeConfig => { } if (themeConfig.summary) { pageCtx.summary = - removeMd( - strippedContent - .trim() - .replace(/^#+\s+(.*)/, '') - .slice(0, themeConfig.summaryLength) - ) + ' ...' + removeMd(strippedContent.trim()) + .replace(/^#+\s+(.*)/, '') + .slice(0, themeConfig.summaryLength) + ' ...' pageCtx.frontmatter.description = pageCtx.summary } if (pageCtx.frontmatter.summary) {