-
-
Notifications
You must be signed in to change notification settings - Fork 97
Description
This component currently uses a forked version of quantizor/markdown-to-jsx.
The original library does not support JSX, so we forked it to add JSX support and improve performance. We want to recommend our own parser by default for users who need JSX.
This parser is actually react focused. the idea would be to extract react dependecies to make this parser cross platform.
Code
Steps to proceed
-
Extract React-specific dependencies using a callback like
createElement: (el => jsx.createElement(el)) -
Move core parser the processor from
packages/@intlayer/design-system/src/components/MarkDownRender/processor.tsx, topackages/@intlayer/core/srcto be imported as@intlayer/core. -
Create dedicated adaptation for frameworks like:
react-intlayer/markdown(for React)vue-intlayer/markdown(for Vue)svelte-intlayer/markdown(for Svelte)(not included in the issue scope)solid-intlayer/markdown(for Solid)(not included in the issue scope)preact-intlayer/markdown(for Preact)(not included in the issue scope)
Requirements
- All tests must continue to pass.
- Performance must remain good.
Test
Ensuire the test and build pass, and markdown are correctly rendered on intlayer doc
Doc example: https://intlayer.org/doc/environment/nextjs