From a6b46a3e26aca76c34ade199244d20c48b85d46b Mon Sep 17 00:00:00 2001 From: Leo Pan Date: Fri, 16 Jun 2017 16:45:21 +0800 Subject: [PATCH] Filter picture use regular filter picturn in search --- lib/plugins/search.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/plugins/search.js b/lib/plugins/search.js index a573f8585..15466be67 100644 --- a/lib/plugins/search.js +++ b/lib/plugins/search.js @@ -87,6 +87,8 @@ function search (keywords) { var postTitle = post.title && post.title.trim(); var postContent = post.body && post.body.trim(); var postUrl = post.slug || ''; + + postContent = postContent.replace(/!\[.*\]\((.+)\)/g,''); if (postTitle && postContent) { keywords.forEach(function (keyword, i) {