diff --git a/assets/js/search.js b/assets/js/search.js index 289b78e33..3baed8d65 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -45,7 +45,7 @@ const removeMarkdown = ( .replace(/(`{3,})(.*?)\1/gm, "$2") .replace(/`(.+?)`/g, "$1") .replace(/\n{2,}/g, "\n\n") - .replace(/\[![a-zA-Z]+\]-? /g, "") + .replace(/\[![a-zA-Z]+\][-\+]? /g, "") } catch (e) { console.error(e) return markdown @@ -139,7 +139,7 @@ const highlight = (content, term) => { } const resultToHTML = ({ url, title, content, term }) => { - const regex = /\[![a-zA-z]\]-? /; + const regex = /\[![a-zA-z]\][-\+]? /; const text = removeMarkdown(content) const resultTitle = highlight(title, term) const resultText = highlight(text, term) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index f6e9ce11e..3f0566855 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -3,7 +3,7 @@