Comments (1)
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)
- The automated release is failing 🚨
- Possible regression in 2.0.0 HOT 2
- It doesn't work with PHP for some reason HOT 1
- how to fix Error in render "TypeError: (0 , _components.default) is not a function" HOT 6
- Action Required: Fix Renovate Configuration
- `loadPrismLang` doesn't handle dependencies
- Clarify license terms - what is a derived work? HOT 5
- Does Not Work Well With Webpack Applications HOT 5
- markdown-it-prism: after importing Critical dependency issues come out HOT 3
- The automated release is failing 🚨
- Compatibility with markdown-it-attrs HOT 1
- Dependency Dashboard
- v2.0.4 should be a new major release HOT 4
- hope to add types for typescript. HOT 5
- Highlight Inline Code Blocks HOT 7
- The package is not consistent with the npmjs website HOT 1
- Cannot use plugins with Vite HOT 2
- If i add languages, everything stop working.
- Not Working In Next.js
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 markdown-it-prism.