This repository has been archived by the owner on Apr 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Example in the docs is broken #7
Comments
I fixed the second issue by using the code from the github repo instead of the npm library |
Thanks for the note here -- it seems like perhaps this is no longer maintained? I intend to put this into production soon for several high-visibility properties, if the maintainers are looking for some help I'd be happy to help out! |
You might be installing the wrong package? The correct one is |
That is indeed the case! Didn't even consider this 🤦🏼♂️ |
fwiw, I am observing the same issue as well, in regards to following the docs markdown usage example, e.g. const rehypePrism = require('@mapbox/rehype-prism');
const remarkParse = require('remark-parse');
const remarkRehype = require('remark-rehype');
const processedMarkdown = await unified()
.use(remarkParse)
.use(remarkeRhype)
.use(rehypePrism)
.process(markdownContents); Error: Cannot `process` without `Compiler` To fix, I would need to add something like |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Running this code sample from the docs is broken, because unified needs a compiler such as
rehype-stringify
to run theprocess
methodFurthermore when adding the
rehype-stringify
compiler the code runs correctly, but the output is not syntax highlighted, it seems that addingrehype-prism
doesn't change the output.Full code sample:
The text was updated successfully, but these errors were encountered: