This commit is contained in:
Jacky Zhao 2023-08-20 20:48:35 -07:00
parent 61d67c9057
commit 57e9297173

View File

@ -58,8 +58,9 @@ function highlight(searchTerm: string, text: string, trim?: boolean) {
}) })
.join(" ") .join(" ")
return `${startIndex === 0 ? "" : "..."}${slice}${endIndex === tokenizedText.length - 1 ? "" : "..." return `${startIndex === 0 ? "" : "..."}${slice}${
}` endIndex === tokenizedText.length - 1 ? "" : "..."
}`
} }
const encoder = (str: string) => str.toLowerCase().split(/([^a-z]|[^\x00-\x7F])/) const encoder = (str: string) => str.toLowerCase().split(/([^a-z]|[^\x00-\x7F])/)