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 rehype-class-names to list of plugins #146

Merged
merged 1 commit into from
Aug 14, 2023

Conversation

lpsinger
Copy link
Contributor

@lpsinger lpsinger commented Aug 5, 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

rehype-add-classes is abandoned; see martypdx/rehype-add-classes#2. rehype-class-names is a fork that has the npm audit issues fixed.

@github-actions github-actions bot added the 👋 phase/new Post is being triaged automatically label Aug 5, 2023
@github-actions

This comment has been minimized.

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (7a95a44) 100.00% compared to head (ef8c998) 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #146   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          461       461           
=========================================
  Hits           461       461           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Aug 5, 2023
doc/plugins.md Outdated Show resolved Hide resolved
rehype-add-classes is abandoned; see martypdx/rehype-add-classes#2.
rehype-class-names is a fork that has the `npm audit` issues fixed.
@lpsinger
Copy link
Contributor Author

I'd suggest holding off on this change until riderjensen/rehype-class-names#1 is fixed.

@riderjensen
Copy link

riderjensen commented Aug 13, 2023

Just wanted to chime in here, very nice to be thought of for being added to the plugins here. Just so you know @wooorm I just updated to v1.0.13 which now uses hast-util-classnames under the hood and expands the plugin's value.

@wooorm
Copy link
Member

wooorm commented Aug 14, 2023

@riderjensen Nice, awesome!

For the types, I think you could use Conditional from hast-util-classnames, and might be nice to use the Plugin type from unified. Here’s how I’d do it it probably mostly working but pseudocode:

import {Root} from 'hast'
import {Conditional} from 'hast-util-classnames'
import {Plugin} from 'unified'

export interface Options {
  [selector: string]: Conditional
}

declare const rehypeClassNames: Plugin<[(Options | null | undefined)?], Root>
export default rehypeClassNames

@wooorm wooorm changed the title Replace rehype-add-classes with rehype-class-names Add rehype-class-names to list of plugins Aug 14, 2023
@wooorm wooorm merged commit 0782171 into rehypejs:main Aug 14, 2023
2 checks passed
@wooorm wooorm added 📚 area/docs This affects documentation 💪 phase/solved Post is done labels Aug 14, 2023
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Aug 14, 2023
@wooorm
Copy link
Member

wooorm commented Aug 14, 2023

Thank y’all! ✨

@lpsinger lpsinger deleted the rehype-class-names branch August 14, 2023 11:48
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

4 participants