Skip to content

Commit c7fcf38

Browse files
woshichaorenssxzz
andauthored
fix: don't overwrite a tag without href (#209)
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
1 parent 3921c85 commit c7fcf38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/output/srcdoc.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@
8989
el.hasAttribute('download') ||
9090
el.getAttribute('rel') === 'external' ||
9191
el.target ||
92-
el.href.startsWith('javascript:')
92+
el.href.startsWith('javascript:') ||
93+
!el.href
9394
)
9495
return
9596

0 commit comments

Comments
 (0)