Skip to content

Commit cfdc81f

Browse files
committed
add alias case
1 parent a2859c1 commit cfdc81f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/utils/code-highlight.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,10 @@ export function linkifyModuleSpecifiers(html: string, options?: LinkifyOptions):
178178
return resolveRelative(moduleSpecifier)
179179
}
180180

181-
if ((cleanSpec.startsWith('#') || cleanSpec.startsWith('~')) && resolveRelative) {
181+
if (
182+
(cleanSpec.startsWith('#') || cleanSpec.startsWith('~') || cleanSpec.startsWith('@/')) &&
183+
resolveRelative
184+
) {
182185
return resolveRelative(moduleSpecifier)
183186
}
184187

0 commit comments

Comments
 (0)