diff --git a/app/components/Markdown.tsx b/app/components/Markdown.tsx index b547ad7..84d1c72 100644 --- a/app/components/Markdown.tsx +++ b/app/components/Markdown.tsx @@ -244,18 +244,21 @@ function getMarkdownComponents() { ); }, - // Links - a: ({ children, href, ...props }: any) => ( - - {children} - - ), + // Links: only external links open in a new tab; internal links (/docs/..., + // /samples, #anchors) navigate in place + a: ({ children, href, ...props }: any) => { + const isExternal = /^https?:\/\//i.test(href ?? ''); + return ( + + {children} + + ); + }, // Strong text strong: ({ children, ...props }: any) => (