Giter Club home page Giter Club logo

Comments (1)

jGleitz avatar jGleitz commented on June 15, 2024

Hi and thanks for reporting this bug!

Both line-highlight and show-language are plugins that rely on the DOM being present (although they would not need to do that). They are programmed to not do anything if there is no DOM (see line-highlight.js#3 and prism-show-language.js#3). There is no DOM when rendering markdown with markdown-it because markdown-it, like any Markdown parser, operates on text tokens. So, unfortunately, this is nothing we can fix in this plugin. The Prism plugins need to be re-written in order to make them work.

In this sense, this bug is a duplicate of #1, for which there already is a warning in the README:

Please note that some prism plugins (notably line-numbers) rely on the DOM being present and can thus not be used with this package (see #1).

Thus, I am going to close this bug. Sorry that we cannot be more helpful!

from markdown-it-prism.

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.