Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

update examples to address needed processing#18

Open
thescientist13 wants to merge 1 commit intomapbox:mainfrom
thescientist13:chore/update-readme-usage-examples
Open

update examples to address needed processing#18
thescientist13 wants to merge 1 commit intomapbox:mainfrom
thescientist13:chore/update-readme-usage-examples

Conversation

@thescientist13
Copy link
Copy Markdown

@thescientist13 thescientist13 commented Nov 1, 2020

related to #7

Given the current examples in the README, 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(/* some markdown */);

I was getting an error

Error: Cannot `process` without `Compiler`

Updated examples to include adding something like

.use(rehypeStringify)

at the end of the chain before process is called

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant