feat: add support for remark plugins#60
Merged
LouisDvr merged 12 commits intoimwithye:mainfrom Mar 5, 2026
Merged
Conversation
…tring to avoid potential errors, e.g. if a user passes an empty array as remark plugins
There was a problem hiding this comment.
Pull request overview
Adds first-class support for passing Remark plugins into the library’s markdown processing pipeline, enabling consumers to extend parsing/transform behavior via the broader Remark ecosystem.
Changes:
- Introduces a new
remarkPluginsprop onMarkdownand wires it into the Unified processor. - Updates the example app and dependencies to demonstrate
remark-cjk-friendly. - Documents plugin usage in the README and adds a sample markdown file for the CJK plugin.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/markdown.tsx | Adds remarkPlugins prop and runs the unified processor with configured remark plugins. |
| README.md | Documents how to inject remark plugins and updates formatting/examples. |
| example/App.tsx | Demonstrates remark plugin usage and adds a new sample entry in the loader UI. |
| example/package.json | Adds remark-cjk-friendly dependency for the example app. |
| example/pnpm-lock.yaml | Lockfile updates for the example dependency changes. |
| markdown/05_cjk_plugin_example.md | Adds a markdown sample demonstrating the CJK emphasis behavior fix. |
Files not reviewed (1)
- example/pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…vocation (this) error
since we now inject remark-cjk-friendly
…gins and remark-gfm)
…nc rather than processor.run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
This PR adds support for remark plugins to allow users take advantage of the remark ecosystem and extend the lib's behavior (when using plugins that add new nodes, users will have to inject the needed renderers using the
customRenderersprop). It finishes the work started in PR #58 by szymonograbek. It also adds a section in theREADMEfile to explain how to use plugins with the lib.📌 Related Issue (Optional)
Link: #43
📷 Screenshots (Optional)
Example using the
remark-cjk-friendlyplugin.📄 Test Markdown File (Optional)
File
05_cjk_plugin_example.mdincluded in the PR✅ Checklist
feat:,fix:,chore:).md) used for testingpnpm run lint:fixto fix formatting and lint errorspnpm i && cd example && pnpm i && pnpm run ios)