Display full path as basename, getAliasesFromMetadata(): return an array instead of a string

This commit is contained in:
Simon Cambier
2022-05-11 16:11:14 +02:00
parent 1d4500fce6
commit 7efddcb616
3 changed files with 26 additions and 15 deletions

View File

@@ -228,10 +228,10 @@ export async function addToIndex(file: TAbstractFile): Promise<void> {
// Make the document and index it
const note: IndexedNote = {
basename: file.basename,
basename: file.path,
content,
path: file.path,
aliases: getAliasesFromMetadata(metadata),
aliases: getAliasesFromMetadata(metadata).join(''),
headings1: metadata
? extractHeadingsFromCache(metadata, 1).join(' ')
: '',
@@ -242,6 +242,7 @@ export async function addToIndex(file: TAbstractFile): Promise<void> {
? extractHeadingsFromCache(metadata, 3).join(' ')
: '',
}
minisearchInstance.add(note)
indexedNotes[note.path] = note
}