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:
parent
1c7822a58b
commit
7ec28722a0
1 changed files with 8 additions and 1 deletions
9
main.ts
9
main.ts
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue