Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(shiki): resolve disposal issue with highlighter instances #103 #104

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dev-kraken
Copy link
Contributor

This commit addresses issue #103 by implementing a singleton pattern for the Shiki highlighter instance. It ensures that instances are reused and properly disposed of, preventing memory leaks and performance degradation during hot reloads.

Copy link

vercel bot commented Jan 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
motion-primitives ❌ Failed (Inspect) Jan 22, 2025 0:23am

@ibelick
Copy link
Owner

ibelick commented Jan 22, 2025

Thanks for the PR! @dev-kraken
Could you rebase it, please? I tested it in the docs and I can’t see the code in the code block of the Installation guide (e.g., https://motion-primitives.com/docs/accordion#installation). Could you check that as well?

This commit addresses issue ibelick#103 by implementing a singleton pattern for the Shiki highlighter instance. It ensures that instances are reused and properly disposed of, preventing memory leaks and performance degradation during hot reloads.
@dev-kraken
Copy link
Contributor Author

Thanks for the PR! @dev-kraken Could you rebase it, please? I tested it in the docs and I can’t see the code in the code block of the Installation guide (e.g., https://motion-primitives.com/docs/accordion#installation). Could you check that as well?

@ibelick rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants