Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wrong tab prefix #34

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading