Skip to content

Add support for passing options to remark-rehype#669

Merged
wooorm merged 6 commits into
remarkjs:mainfrom
peolic:rehype-options
Jan 17, 2022
Merged

Add support for passing options to remark-rehype#669
wooorm merged 6 commits into
remarkjs:mainfrom
peolic:rehype-options

Conversation

@peolic

@peolic peolic commented Jan 13, 2022

Copy link
Copy Markdown
Contributor

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.

@wooorm wooorm left a comment

Copy link
Copy Markdown
Member

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:

Comment thread lib/react-markdown.js Outdated
Comment thread test/test.jsx Outdated
- Rename `rehypeOptions` to `remarkRehypeOptions`
- Update test
Comment thread readme.md Outdated
Comment thread readme.md Outdated
@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

wooorm commented Jan 17, 2022

Copy link
Copy Markdown
Member

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