Skip to content

Commit

Permalink
Update tag handling for full path support
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
PxaMMaxP committed Jul 23, 2024
1 parent 943008f commit 2c2af86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/BlockRenderComponents/HeaderBlockRenderComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,10 +447,10 @@ export default class HeaderBlockRenderComponent
const fullPath = path ? `${path}/${tag}` : tag;
const li = document.createElement('li');

const tagObject = new Tag(tag);
const tagObject = new Tag(fullPath);

const tagLink = tagObject.getObsidianLink(
path ? tagObject.toString() : tagObject.tagWithHash,
path ? tagObject.getElements().last() : tagObject.tagWithHash,
);

li.appendChild(tagLink);
Expand Down

0 comments on commit 2c2af86

Please sign in to comment.