1
Fork 0
mirror of https://github.com/Steffo99/obsidian-file-index.git synced 2024-12-03 10:24:19 +00:00

Basename include extensions for non-md files

This commit is contained in:
Steffo 2023-11-17 14:55:11 +01:00
parent 1c7822a58b
commit 7ec28722a0
Signed by: steffo
GPG key ID: 2A24051445686895

View file

@ -62,7 +62,14 @@ export default class FileIndexPlugin extends Plugin {
paths.push(file.path)
const basename = file.basename.toLocaleLowerCase()
let basename
if(file.extension === "md") {
basename = file.basename.toLocaleLowerCase()
}
else {
basename = file.basename.toLocaleLowerCase() + "." + file.extension.toLocaleLowerCase()
}
if(basenames.hasOwnProperty(basename)) {
console.warn("[FileIndexPlugin] Multiple files with the same basename detected:", basenames[basename], file.path)
}