mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-19 10:54:06 -06:00
refactor(search): improve encoder function formatting
- Updated the encoder function to use consistent arrow function syntax for better readability.
This commit is contained in:
parent
46b383df7f
commit
3451bebb20
@ -16,12 +16,11 @@ interface Item {
|
||||
type SearchType = "basic" | "tags"
|
||||
let searchType: SearchType = "basic"
|
||||
let currentSearchTerm: string = ""
|
||||
// Encoder text
|
||||
const encoder = (str: string) => {
|
||||
return str
|
||||
.toLowerCase()
|
||||
.split(/\s+/)
|
||||
.filter(token => token.length > 0)
|
||||
.filter((token) => token.length > 0)
|
||||
}
|
||||
|
||||
let index = new FlexSearch.Document<Item>({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user