Skip to content

Commit d86ee52

Browse files
committed
Fix KanbanHelper file lookup for #23
1 parent 5424dbb commit d86ee52

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "metaedit",
33
"name": "MetaEdit",
4-
"version": "1.6.9",
4+
"version": "1.6.10",
55
"minAppVersion": "0.12.0",
66
"description": "MetaEdit helps you manage your metadata.",
77
"author": "Christian B. B. Houmann",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "metaedit",
3-
"version": "1.6.9",
3+
"version": "1.6.10",
44
"description": "MetaEdit helps you manage your metadata.",
55
"main": "main.js",
66
"scripts": {

src/main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@ export default class MetaEdit extends Plugin {
180180

181181
if (links) {
182182
for (const link of links) {
183-
const linkFile: TAbstractFile = this.app.vault.getAbstractFileByPath(`${link.link}.md`);
183+
// Because of how links are formatted, I have to do it this way.
184+
// If there are duplicates (two files with the same name) for a link, the path will be in the link.
185+
// If not, the link won't specify the folder. Therefore, we check all files.
186+
const markdownFiles: TFile[] = this.app.vault.getMarkdownFiles();
187+
const linkFile: TFile = markdownFiles.find(f => f.path.includes(`${link.link}.md`));
184188

185189
if (linkFile instanceof TFile) {
186190
const heading = this.getTaskHeading(link.link, fileContent);

versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"1.6.9": "0.12.0"
2+
"1.6.10": "0.12.0"
33
}

0 commit comments

Comments
 (0)