Skip to content

feat: add support for remark plugins#60

Merged
LouisDvr merged 12 commits intoimwithye:mainfrom
LouisDvr:feat/plugins
Mar 5, 2026
Merged

feat: add support for remark plugins#60
LouisDvr merged 12 commits intoimwithye:mainfrom
LouisDvr:feat/plugins

Conversation

@LouisDvr
Copy link
Copy Markdown
Collaborator

@LouisDvr LouisDvr commented Feb 22, 2026

📝 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 customRenderers prop). It finishes the work started in PR #58 by szymonograbek. It also adds a section in the README file to explain how to use plugins with the lib.

📌 Related Issue (Optional)

Link: #43

📷 Screenshots (Optional)

Example using the remark-cjk-friendly plugin.

Before After

📄 Test Markdown File (Optional)

File 05_cjk_plugin_example.md included in the PR

✅ Checklist

  • My PR title follows the Conventional Commit format (e.g. feat:, fix:, chore:)
  • This PR addresses the related issue (if applicable)
  • I have attached a sample Markdown file (.md) used for testing
  • I have attached at least one screenshot of the rendered output (light and/or dark mode preferred)
  • I have run pnpm run lint:fix to fix formatting and lint errors
  • I have tested the changes in the example app (pnpm i && cd example && pnpm i && pnpm run ios)

@LouisDvr LouisDvr self-assigned this Feb 22, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 remarkPlugins prop on Markdown and 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.

Comment thread example/App.tsx
Comment thread README.md Outdated
Comment thread src/markdown.tsx
Comment thread example/App.tsx Outdated
@LouisDvr LouisDvr mentioned this pull request Feb 22, 2026
6 tasks
@LouisDvr LouisDvr merged commit f62b5c1 into imwithye:main Mar 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants