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
This commit is contained in:
Md Jawad Noor Asif 2023-03-30 15:14:00 +06:00 committed by GitHub
parent b7c305e002
commit 1b74f4a964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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",