Skip to content

Commit 72b9034

Browse files
committed
internal links within a file in a subdirectory using anchor tags
- this got broke, I think when fixing relative anchor tag links
1 parent 6943601 commit 72b9034

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/packages/frontend/components/smart-anchor-tag.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ function InternalRelativeLink({ project_id, path, href, title, children }) {
354354
const fragmentId = Fragment.decode(url.hash);
355355
const hrefPlain = url.pathname.slice(1);
356356
let target;
357-
if (!hrefPlain) {
357+
if (href.startsWith("#") || !hrefPlain) {
358358
// within the same file
359359
target = join("files", path);
360360
} else {

0 commit comments

Comments
 (0)