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 sync transform if w/ only explicit plugins #40

Merged
merged 2 commits into from
Mar 6, 2024
Merged

Add sync transform if w/ only explicit plugins #40

merged 2 commits into from
Mar 6, 2024

Conversation

talatkuyuk
Copy link
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

I added a synchronous transformer if "options.plugins" doesn't contain a string.

I've been using react-markdown which supports only synchronous transformers. The plugins that I used in the plugin list in my project is about 20, the only async transformer was remark-textr which caused a problem. I created a custom plugin in my project, but wanted to share with the community.

I added a test and also tested in with ReactMarkdown in my project.

I don't believe it's necessary to add this to the README since it doesn't affect users. This does not require any breaking change.

@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 Mar 3, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (429e2ca) to head (5cd39d6).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #40   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines           82       105   +23     
=========================================
+ Hits            82       105   +23     

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

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.

Sounds like a good idea, thank you!

test.js Outdated Show resolved Hide resolved
lib/index.js Outdated Show resolved Hide resolved
lib/index.js Outdated Show resolved Hide resolved
Copy link
Contributor Author

@talatkuyuk talatkuyuk left a comment

Choose a reason for hiding this comment

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

All your suggestions are applied. Hope it is fine.

@wooorm wooorm changed the title Add synchronous transformer if "options.plugins" doesn't contain any string Add sync transform if w/ only explicit plugins Mar 6, 2024
@wooorm wooorm merged commit d5009e4 into remarkjs:main Mar 6, 2024
2 checks passed

This comment has been minimized.

@wooorm wooorm added 🦋 type/enhancement This is great to have 💪 phase/solved Post is done labels Mar 6, 2024
@github-actions github-actions bot removed the 🤞 phase/open Post is being triaged manually label Mar 6, 2024
@wooorm
Copy link
Member

wooorm commented Mar 6, 2024

Released! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 phase/solved Post is done 🦋 type/enhancement This is great to have
Development

Successfully merging this pull request may close these issues.

3 participants