Skip to content

Commit 702e75d

Browse files
committed
Fix type reference links missing base path in DocstringRenderer
1 parent 7e9f09c commit 702e75d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/lib/components/api/DocstringRenderer.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@
9393
const target = lookupRef(token);
9494
if (target) {
9595
const link = document.createElement('a');
96-
link.href = target.path;
96+
const fullPath = `${base}/${target.path}`;
97+
link.href = fullPath;
9798
link.className = 'type-link';
9899
link.textContent = token;
99100
link.addEventListener('click', (e) => {
@@ -102,7 +103,7 @@
102103
name: target.name,
103104
type: target.type as 'class' | 'function' | 'method' | 'module'
104105
});
105-
goto(target.path);
106+
goto(fullPath);
106107
});
107108
span.appendChild(link);
108109
} else {

0 commit comments

Comments
 (0)