mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-26 05:23:40 +00:00
Core: Link improve external link detection by enabling it on any protocols
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'fumadocs-core': patch
|
||||
---
|
||||
|
||||
`Link` improve external link detection by enabling it on any protocols
|
||||
@@ -20,11 +20,10 @@ const Link = forwardRef<HTMLAnchorElement, LinkProps>(
|
||||
(
|
||||
{
|
||||
href = '#',
|
||||
external = !(
|
||||
href.startsWith('/') ||
|
||||
href.startsWith('#') ||
|
||||
href.startsWith('.')
|
||||
),
|
||||
// any protocol
|
||||
external = href.match(/^\w+:/) ||
|
||||
// protocol relative URL
|
||||
href.startsWith('//'),
|
||||
prefetch,
|
||||
...props
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user