From f58819bb3a6cb8f6b16cc206698e94056340bfa9 Mon Sep 17 00:00:00 2001 From: curben <2809763-curben@users.noreply.gitlab.com> Date: Mon, 12 Aug 2019 19:15:10 +0930 Subject: [PATCH] fix(open_graph): exclude svg files --- themes/typing/scripts/openGraph.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/typing/scripts/openGraph.js b/themes/typing/scripts/openGraph.js index 804a963..14747e7 100644 --- a/themes/typing/scripts/openGraph.js +++ b/themes/typing/scripts/openGraph.js @@ -72,7 +72,7 @@ function openGraphHelper (options = {}) { let img const imgPattern = /]*src=['"]([^'"]+)([^>]*>)/gi while ((img = imgPattern.exec(content)) !== null) { - images.push(img[1]) + if (!img[1].endsWith('.svg')) images.push(img[1]) } }