Align solid-markdown with react-markdown 10.1.0 and add Solid-native async rendering#44
Draft
keithce wants to merge 1 commit intoandi23rosca:mainfrom
Draft
Conversation
Owner
|
Thanks for this! I'll have to play around with it and test it but I agree with the overall changes 👍🏻 |
Owner
|
@keithce we should probably bump the version to |
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.
Title
Align
solid-markdownwithreact-markdown10.1.0 and add Solid-native async renderingSummary
This update moves
solid-markdownfrom an older compatibility-focused API to an upstream-alignedreact-markdown10.1.0 style API, adapted for Solid. The rendering pipeline now follows the upstreamremark -> rehype -> JSX runtimemodel, the public options match current upstream concepts, and async unified plugins are supported both on the server and on the client.What changed
hast-util-to-jsx-runtime.Markdown,MarkdownAsync,MarkdownResource,remarkRehypeOptions, andurlTransform.node.MarkdownResource.Why this is valuable
react-markdown.Compatibility and migration
This change is intentionally breaking in the same places where upstream has already moved on:
SolidMarkdownis removed in favor of the defaultMarkdownexport.class/classNameare removed; callers should wrap the component themselves.source,plugins,renderers,allowNode,allowedTypes,disallowedTypes,transformLinkUri, andtransformImageUrinow throw.urlTransformreplaces the older link/image transform props.renderingStrategyremains temporarily for the sync component only, but it is deprecated and intended for removal in the next major release.Verification
Verified locally with:
pnpm lint pnpm test pnpm buildCurrent test coverage includes:
MarkdownAsyncandMarkdownResourceNotes for review
solid-markdownAPI quirk. The goal is to make this package a clean Solid port of modernreact-markdown.renderingStrategyprop onMarkdown.