Git Product home page Git Product logo

Comments (6)

antfu avatar antfu commented on August 20, 2024 3

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.

xarthurx avatar xarthurx commented on August 20, 2024

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.

boidushya avatar boidushya commented on August 20, 2024

Facing the same issue with @shikijs/rehype

from shiki.

antfu avatar antfu commented on August 20, 2024

@babakfp I am sorry, where is your related code in your reproduction?

from shiki.

antfu avatar antfu commented on August 20, 2024

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 avatar babakfp commented on August 20, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.