mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-26 05:19:01 +00:00
format
This commit is contained in:
parent
4e42d52e16
commit
777ff51c7a
1 changed files with 3 additions and 2 deletions
|
@ -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])/)
|
||||||
|
|
Loading…
Reference in a new issue