Comments (6)
Thanks, I see it better now. If in unified, the plugin are supported to be used in a factory function, I think that would make sense for us to use the shared singleton instance by default. Made the change in c4f030d.
from shiki.
Same problem here.
Using markdown-it
as a plugin for nuxt3
.
import mdShiki from "@shikijs/markdown-it";
const renderer = MarkdownIt({
linkify: true,
html: true,
})
.use(mdFootnote)
.use(
await mdShiki({
themes: {
light: "snazzy-light",
dark: "nord",
},
}),
)
from shiki.
Facing the same issue with @shikijs/rehype
from shiki.
@babakfp I am sorry, where is your related code in your reproduction?
from shiki.
About this warning in general, ideally you should avoid creating new rehype instance in a loop. For everyone who encountered this warning, please review your usage and see if there is a refactor you could make. Also share your usage and fix here, so we could have a better understanding of how people are using it, and potentially improve the docs.
from shiki.
@babakfp I am sorry, where is your related code in your reproduction?
Sorry about that.
I made a proper reproduction here: https://github.com/babakfp/shikijs-shiki-issues-714
Watching this video may be helpful.
2024-07-02.17-45-24.mp4
It seems like the message only shows up on every second or third restart of the server. When just running pnpm dev
, it doesn't show up. If you do (ctrl
+ s
) after that, it still doesn't show up. If you do it again, it shows up.
In my https://github.com/babakfp/babakfp.ir project, it happens after running pnpm dev
. Maybe something is wrong with my code that Vite/SvelteKit auto restarts the server, and it triggers the message.
2024-07-02.17-59-36.mp4
from shiki.
Related Issues (20)
- Return the grammar state after tokenizing HOT 3
- shiki/wasm dependency not found HOT 1
- Decorations API throws TypeError when decorating last index
- Doc: `@shikijs/markdown-it` and transformers usage
- Unable to use Color Replacements option in the `Rehype` plugin
- Support for Lit HOT 5
- Decorations API silently fails when `start.line > end.line`
- Code transformers do not work correctly with `rose-pine` theme
- creating a shiki wrapper for nextjs, and rsc HOT 4
- Module not found: Error: Can't resolve 'shiki/wasm' in 'D:\test\node_modules\shiki\dist\chunks' HOT 1
- `@shikijs/transformers` not working with Astro HOT 1
- Make grammar state working with `themes` instead of just `theme` HOT 6
- Cypress test failed with Shiki HOT 1
- Option to exclude themeMatches from explanations HOT 1
- Transformer bug with SQL HOT 2
- common transformers: line markers HOT 1
- Allow overriding/optionalizing background color HOT 1
- Twoslash: `meta` is passed to the popup types codeblock
- `New grammar`: org support HOT 1
- [BUG] @shikijs/monaco bundle size HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shiki.