rehype-prism vs rehype-highlight #43
Unanswered
chrisrzhou
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on integrating support for code files through a common step by parsing code source files into a code block. I'm deciding between
rehype-prism
andrehype-highlight
and would like to know which one is better suited within therehype
community.This is not a discussion of
prism.js
vshighlight.js
, but which flavor of syntax highlighting works better with the rehype ecosystem.Pasting a very brief pseudocode of the idea I have behind this, just to also get feedback if there's a better way to achieve what I'm doing:
My main concerns with the approach above (aside from picking either highlight vs lowlight as a plugin), are:
language-${extension}
might not always work, but I can't think of a better way to do this. I think thelanguage-${extension}
is just a semantic way to inform the code block about the language of the code in use. Is there a better concept to rely on for what I'm trying to do above?Thanks and any feedback/guidance on the questions will help me out on this. And let me know what the rehype community prefers as a code syntax highlighting solution!
Beta Was this translation helpful? Give feedback.
All reactions