From 1b74f4a9644593c624e7a4f04f605cbea580e28b Mon Sep 17 00:00:00 2001 From: Md Jawad Noor Asif Date: Thu, 30 Mar 2023 15:14:00 +0600 Subject: [PATCH] fix: fix search highlight not showing because for trailing slash ### fix: fix search highlight not showing because for trailing slash > before-fix (with slash) : https://ibb.co/Qr1Dpqp > after-fix (without slash): https://ibb.co/w4dD3Nm --- assets/js/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/util.js b/assets/js/util.js index 530bd7dc0..bd434c733 100644 --- a/assets/js/util.js +++ b/assets/js/util.js @@ -117,7 +117,7 @@ const resultToHTML = ({ url, title, content }) => { const redir = (id, term) => { const shouldTrim = PRODUCTION && SEARCH_ENABLED const baseURLPrefix = shouldTrim ? "" : BASE_URL.replace(/\/$/g, "") - const urlString = `${baseURLPrefix}${id}#:~:text=${encodeURIComponent(term)}/` + const urlString = `${baseURLPrefix}${id}#:~:text=${encodeURIComponent(term)}` window.Million.navigate( new URL(urlString), ".singlePage",