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 fromHtml
example to readme.md
#17
Conversation
The `fromHtml` utility is more convenient to use than hand-crafting the hast with `h`. Add an example that demonstrates how to use it in the readme
Ideally this would just be abstracted away by |
The unsuccessful checks do not appear related to my readme change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not opposed to including an example on how to do this. I don‘t think it’s a good idea to require an HTML parser in plugins though.
Co-authored-by: Titus <tituswormer@gmail.com> Signed-off-by: Alan <altano@gmail.com>
Co-authored-by: Titus <tituswormer@gmail.com> Signed-off-by: Alan <altano@gmail.com>
Co-authored-by: Titus <tituswormer@gmail.com> Signed-off-by: Alan <altano@gmail.com>
This comment was marked as resolved.
This comment was marked as resolved.
Thank you! :) |
This comment has been minimized.
This comment has been minimized.
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [rehype-autolink-headings](https://togithub.com/rehypejs/rehype-autolink-headings) | [`^6.1.1` -> `^7.0.0`](https://renovatebot.com/diffs/npm/rehype-autolink-headings/6.1.1/7.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/rehype-autolink-headings/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/rehype-autolink-headings/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/rehype-autolink-headings/6.1.1/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/rehype-autolink-headings/6.1.1/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>rehypejs/rehype-autolink-headings (rehype-autolink-headings)</summary> ### [`v7.0.0`](https://togithub.com/rehypejs/rehype-autolink-headings/releases/tag/7.0.0) [Compare Source](https://togithub.com/rehypejs/rehype-autolink-headings/compare/6.1.1...7.0.0) ##### Change - [`394560f`](https://togithub.com/rehypejs/rehype-autolink-headings/commit/394560f) Update `@types/hast`, `unified`, utilities, etc **migrate**: update too - [`6bebeab`](https://togithub.com/rehypejs/rehype-autolink-headings/commit/6bebeab) Change to require Node.js 16 **migrate**: update too - [`f20421f`](https://togithub.com/rehypejs/rehype-autolink-headings/commit/f20421f) Change to use `exports` **migrate**: don’t use private APIs - [`98849a7`](https://togithub.com/rehypejs/rehype-autolink-headings/commit/98849a7) Remove undocumented ancient `behaviour` spelling **migrate**: use international english: `behavior` ##### Add - [`92f0258`](https://togithub.com/rehypejs/rehype-autolink-headings/commit/92f0258) Add support for passing a function as `properties` ##### Misc - [`305d6d0`](https://togithub.com/rehypejs/rehype-autolink-headings/commit/305d6d0) Add `fromHtml` example by [@​altano](https://togithub.com/altano) in [rehypejs/rehype-autolink-headings#17 **Full Changelog**: rehypejs/rehype-autolink-headings@6.1.1...7.0.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/creatorsgarten/contentsgarten). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi43OS4xIiwidXBkYXRlZEluVmVyIjoiMzYuNzkuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [rehype-autolink-headings](https://togithub.com/rehypejs/rehype-autolink-headings) | [`^6.1.1` -> `^7.0.0`](https://renovatebot.com/diffs/npm/rehype-autolink-headings/6.1.1/7.0.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/rehype-autolink-headings/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/rehype-autolink-headings/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/rehype-autolink-headings/6.1.1/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/rehype-autolink-headings/6.1.1/7.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>rehypejs/rehype-autolink-headings (rehype-autolink-headings)</summary> ### [`v7.0.0`](https://togithub.com/rehypejs/rehype-autolink-headings/releases/tag/7.0.0) [Compare Source](https://togithub.com/rehypejs/rehype-autolink-headings/compare/6.1.1...7.0.0) ##### Change - [`394560f`](https://togithub.com/rehypejs/rehype-autolink-headings/commit/394560f) Update `@types/hast`, `unified`, utilities, etc **migrate**: update too - [`6bebeab`](https://togithub.com/rehypejs/rehype-autolink-headings/commit/6bebeab) Change to require Node.js 16 **migrate**: update too - [`f20421f`](https://togithub.com/rehypejs/rehype-autolink-headings/commit/f20421f) Change to use `exports` **migrate**: don’t use private APIs - [`98849a7`](https://togithub.com/rehypejs/rehype-autolink-headings/commit/98849a7) Remove undocumented ancient `behaviour` spelling **migrate**: use international english: `behavior` ##### Add - [`92f0258`](https://togithub.com/rehypejs/rehype-autolink-headings/commit/92f0258) Add support for passing a function as `properties` ##### Misc - [`305d6d0`](https://togithub.com/rehypejs/rehype-autolink-headings/commit/305d6d0) Add `fromHtml` example by [@​altano](https://togithub.com/altano) in [rehypejs/rehype-autolink-headings#17 **Full Changelog**: rehypejs/rehype-autolink-headings@6.1.1...7.0.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/levaintech/contented). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOS4yIiwidXBkYXRlZEluVmVyIjoiMzcuMTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Initial checklist
Description of changes
The
fromHtml
utility is more convenient to use than hand-crafting the hast withh
. Add an example that demonstrates how to use it in the readme