Skip to content

Commit 2c2af86

Browse files
committed
Update tag handling for full path support
Refactor tag initialization in HeaderBlockRenderComponent to handle full paths by creating Tag objects with the fullPath variable. Adjust tag link generation to use the last element of tagObject for improved path specificity.
1 parent 943008f commit 2c2af86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libs/BlockRenderComponents/HeaderBlockRenderComponent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,10 +447,10 @@ export default class HeaderBlockRenderComponent
447447
const fullPath = path ? `${path}/${tag}` : tag;
448448
const li = document.createElement('li');
449449

450-
const tagObject = new Tag(tag);
450+
const tagObject = new Tag(fullPath);
451451

452452
const tagLink = tagObject.getObsidianLink(
453-
path ? tagObject.toString() : tagObject.tagWithHash,
453+
path ? tagObject.getElements().last() : tagObject.tagWithHash,
454454
);
455455

456456
li.appendChild(tagLink);

0 commit comments

Comments
 (0)