shikijs / twoslash

You take some Shiki, add a hint of TypeScript compiler, and 🎉 incredible static code samples
https://shikijs.github.io/twoslash/
MIT License
1.08k stars 54 forks source link

fix(docusaurus-preset): fix text collection for copy button #85

Closed arthurdenner closed 3 years ago

arthurdenner commented 3 years ago

Hi! 👋🏽

This PR proposes a fix to a bug found when investigating https://github.com/remotion-dev/remotion/issues/496: the copy button works fine in development but doesn't work in production.

After investigation, I noticed the reason being the "cast" of pre.current.querySelectorAll to an array.

I created a repo with a reproducible scenario and more information about the issue and the proposed fix: https://github.com/arthurdenner/docusaurus-twoslash-bug

changeset-bot[bot] commented 3 years ago

🦋 Changeset detected

Latest commit: a2bb854c4580e55c9f35bbaf3754c8a3f5b614c4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | -------------------------------- | ----- | | docusaurus-preset-shiki-twoslash | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

frencojobs commented 3 years ago

Hi @arthurdenner. Thanks a lot for the observation, repro, and the PR. It is merged and deployed as v1.1.16.