8000 fix(twoslash): avoid genreate duplicate hovers · antfu/shikiji@043524a · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 043524a

Browse files
committed
fix(twoslash): avoid genreate duplicate hovers
1 parent b1a9408 commit 043524a

File tree

1 file changed

+2
-0
lines changed
  • packages/shikiji-twoslash/src

1 file changed

+2
-0
lines changed

packages/shikiji-twoslash/src/core.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ export function createTransformerFactory(
231231
tokens.forEach((token) => {
232232
if (tokensSkipHover.has(token))
233233
return
234+
// Already hovered, don't hover again
235+
tokensSkipHover.add(token)
234236
const clone = { ...token }
235237
Object.assign(token, renderer.nodeStaticInfo.call(this, node, clone))
236238
})

0 commit comments

Comments
 (0)
0