Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for passing options to remark-rehype #669

Merged
merged 6 commits into from
Jan 17, 2022
Merged

Add support for passing options to remark-rehype #669

merged 6 commits into from
Jan 17, 2022

Conversation

peolic
Copy link
Contributor

@peolic peolic commented Jan 13, 2022

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

This PR updates remark-rehype to v10, and adds options passthrough to remark-rehype.
This is to enable new options such as clobberPrefix, which is needed when rendering more than one Markdown document on a page (e.g. comments).
Attempted to follow the guidelines and current code structure as much as I could.

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Jan 13, 2022
@codecov-commenter

This comment has been minimized.

Copy link
Member

@wooorm wooorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for working on this. It looks wonderful.

I had been holding off on this because it unfortunately is a breaking change (footnotes generate different output now).

2 ideas for improving this PR:

lib/react-markdown.js Outdated Show resolved Hide resolved
test/test.jsx Outdated Show resolved Hide resolved
- Rename `rehypeOptions` to `remarkRehypeOptions`
- Update test
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
@wooorm wooorm changed the title Add remark-rehype options passthrough Add support for passing options to remark-rehype Jan 17, 2022
@wooorm wooorm merged commit 36e4916 into remarkjs:main Jan 17, 2022
@wooorm wooorm added the 💪 phase/solved Post is done label Jan 17, 2022
@github-actions

This comment has been minimized.

@wooorm wooorm added 📦 area/deps This affects dependencies 🧑 semver/major This is a change labels Jan 17, 2022
@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Jan 17, 2022
@peolic peolic deleted the rehype-options branch January 17, 2022 18:19
@wooorm
Copy link
Member

wooorm commented Jan 17, 2022

Thanks @peolic, released!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 area/deps This affects dependencies 💪 phase/solved Post is done 🧑 semver/major This is a change
Development

Successfully merging this pull request may close these issues.

3 participants