Skip to content

Commit

Permalink
fix: wrong tab prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
kmlbgn committed Mar 7, 2024
1 parent 756d4a7 commit be74296
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"scripts": {
"sync": "rsync -av --delete docs/ ../docs.kira.network/docs/",
"test": "vitest",
"build": "npm run test -- --run && tsc && cp ./src/css/*.css dist/ && echo Build successful",
"build-only": "tsc && cp ./src/css/*.css dist/",
Expand Down
9 changes: 1 addition & 8 deletions src/plugins/internalLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,7 @@ function convertLinkHref(
page: NotionPage,
url: string
): string {
let convertedLink: string;
// If the link is from the current tab, use the direct link path to the page
if (tab == context.currentTab) {
convertedLink = context.layoutStrategy.getLinkPathForPage(page);
} else {
// If the link is from a different tab, prepend '/' and the tab name to the link path
convertedLink = "/" + tab + context.layoutStrategy.getLinkPathForPage(page);
}
let convertedLink = "/" + tab + context.layoutStrategy.getLinkPathForPage(page);

// Extract the fragment identifier from the URL, if it exists
const { fragmentId } = parseLinkId(url);
Expand Down

0 comments on commit be74296

Please sign in to comment.