Skip to content

Commit 1a8e3d7

Browse files
committed
refactor: . Rename 'filename' field to better convey its meaning
1 parent 7424fd6 commit 1a8e3d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Task/Link.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import type { LinkCache } from 'obsidian';
22

33
export class Link {
44
private readonly rawLink: LinkCache;
5-
private readonly filename: string;
5+
private readonly filenameContainingLink: string;
66

77
/**
88
* @param {LinkCache} rawLink - The raw link from Obsidian cache.
99
* @param {string} filename - The name of the file where this link is located.
1010
*/
1111
constructor(rawLink: LinkCache, filename: string) {
1212
this.rawLink = rawLink;
13-
this.filename = filename;
13+
this.filenameContainingLink = filename;
1414
}
1515

1616
public get originalMarkdown() {
@@ -30,7 +30,7 @@ export class Link {
3030
public get destinationFilename() {
3131
// Handle internal links (starting with '#')
3232
if (this.destination.startsWith('#')) {
33-
return this.filename;
33+
return this.filenameContainingLink;
3434
}
3535

3636
// Extract filename from path (handles both path and optional hash fragment)

0 commit comments

Comments
 (0)