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 fromHtml example to readme.md #17

Merged
merged 6 commits into from Jul 5, 2023
Merged

Add fromHtml example to readme.md #17

merged 6 commits into from Jul 5, 2023

Conversation

altano
Copy link
Contributor

@altano altano commented Jul 4, 2023

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

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

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
@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 Jul 4, 2023
@altano
Copy link
Contributor Author

altano commented Jul 4, 2023

Ideally this would just be abstracted away by rehype-autolink-headings (have content continue to accept hast but make htmlContent and svgContent options as alternatives that accept content as a string, or something?) but I figured we could start with a readme tweak.

@altano
Copy link
Contributor Author

altano commented Jul 4, 2023

The unsuccessful checks do not appear related to my readme change.

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.

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.

readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
wooorm and others added 4 commits July 5, 2023 09:32
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>
@codecov-commenter

This comment was marked as resolved.

@wooorm wooorm merged commit 305d6d0 into rehypejs:main Jul 5, 2023
2 checks passed
@wooorm wooorm added 📚 area/docs This affects documentation 💪 phase/solved Post is done labels Jul 5, 2023
@wooorm
Copy link
Member

wooorm commented Jul 5, 2023

Thank you! :)

@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Jul 5, 2023
renovate bot added a commit to creatorsgarten/contentsgarten that referenced this pull request Sep 6, 2023
[![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 [@&#8203;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>
fuxingloh pushed a commit to fuxingloh/contented that referenced this pull request Oct 20, 2023
[![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 [@&#8203;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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 area/docs This affects documentation 💪 phase/solved Post is done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants