mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: handle uppercase in fuzzy search mode
This commit is contained in:
parent
ebcae23ba1
commit
7e10717566
1 changed files with 3 additions and 6 deletions
|
|
@ -18,13 +18,10 @@ export const fuzzyMode: ModeShape = {
|
|||
}
|
||||
},
|
||||
renderNodeLabelText(node, searchKey) {
|
||||
const { name, path } = node
|
||||
const { name } = node
|
||||
const path = hasUpperCase(searchKey) ? node.path : node.path.toLowerCase()
|
||||
|
||||
const indexes = fuzzyMatchIndexes(
|
||||
searchKey.toLowerCase(),
|
||||
path.toLowerCase(),
|
||||
path.length - name.length,
|
||||
)
|
||||
const indexes = fuzzyMatchIndexes(searchKey, path, path.length - name.length)
|
||||
const chunks = name.split('/')
|
||||
let progress = 0
|
||||
return chunks.map((chunk, index, chunks) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue