Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
fix(twoslash): avoid genreate duplicate hovers
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jan 15, 2024
1 parent b1a9408 commit 043524a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/shikiji-twoslash/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ export function createTransformerFactory(
tokens.forEach((token) => {
if (tokensSkipHover.has(token))
return
// Already hovered, don't hover again
tokensSkipHover.add(token)
const clone = { ...token }
Object.assign(token, renderer.nodeStaticInfo.call(this, node, clone))
})
Expand Down

0 comments on commit 043524a

Please sign in to comment.