From db27557aa307921cf035b7f62d9d9f2b452b1018 Mon Sep 17 00:00:00 2001 From: Md Jawad Noor Asif Date: Thu, 30 Mar 2023 17:14:06 +0600 Subject: [PATCH] fix: search highlight not showing because for trailing slash (#306) --- 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",