mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Fix jumping to note from Khoj Obsidian search modal result on Windows
- Issue The file path separator by khoj server and the Obsidian vault were different on Windows - Fix Normalize file path to use forward slash(/) to find the matching note file in the Obsidian vault for jump to it Resolves #177
This commit is contained in:
parent
7184508784
commit
4fb628975c
1 changed files with 1 additions and 1 deletions
|
@ -109,7 +109,7 @@ export class KhojModal extends SuggestModal<SearchResult> {
|
||||||
.sort((a, b) => b.path.length - a.path.length)
|
.sort((a, b) => b.path.length - a.path.length)
|
||||||
// The first match is the best file match across OS
|
// The first match is the best file match across OS
|
||||||
// e.g Khoj server on Linux, Obsidian vault on Android
|
// e.g Khoj server on Linux, Obsidian vault on Android
|
||||||
.find(file => result.file.endsWith(file.path))
|
.find(file => result.file.replace(/\\/g, "/").endsWith(file.path))
|
||||||
|
|
||||||
// Open vault file at heading of chosen search result
|
// Open vault file at heading of chosen search result
|
||||||
if (file_match) {
|
if (file_match) {
|
||||||
|
|
Loading…
Reference in a new issue