Skip to content

Commit

Permalink
fix folder bug
Browse files Browse the repository at this point in the history
  • Loading branch information
StrangeGirlMurph committed Mar 7, 2024
1 parent e8dfc12 commit a2ade9d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/utils/suggesters/folderSuggest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ export class FolderSuggest extends TextInputSuggest<string> {
folders.push(createNoteInActiveNotesFolderMarker);

abstractFiles.forEach((folder: TAbstractFile) => {
if (folder instanceof TFolder && folder.path.toLowerCase().contains(lowerCaseInputStr)) {
folders.push(folder.path);
if (folder instanceof TFolder) {
const path = folder.path === "/" ? "/" : "/" + folder.path;
if (path.toLowerCase().contains(lowerCaseInputStr)) {
folders.push(path);
}
}
});

folders.sort((a, b) => a.localeCompare(b) )

return folders;
}
Expand Down

0 comments on commit a2ade9d

Please sign in to comment.