-
Notifications
You must be signed in to change notification settings - Fork 24
fix(deps): update dependency markdown-to-jsx to v9 #405
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
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/markdown-to-jsx-9.x
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+20
−9
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
4478b99 to
a8fca47
Compare
bd963f8 to
14bc66e
Compare
00e18df to
ab3dd8d
Compare
ab3dd8d to
df1c1f2
Compare
df1c1f2 to
c828a3c
Compare
c828a3c to
7b0e02f
Compare
7b0e02f to
346f493
Compare
346f493 to
cb2c955
Compare
cb2c955 to
dbbdce5
Compare
c2b08fb to
6f646fb
Compare
bed563f to
c088d96
Compare
c088d96 to
1507180
Compare
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.
This PR contains the following updates:
^8.0.0->^9.5.0Release Notes
quantizor/markdown-to-jsx (markdown-to-jsx)
v9.5.0Compare Source
Minor Changes
7605d88: Add React Server Components (RSC) support with automatic environment detection.The
Markdowncomponent now seamlessly works in both RSC and client-side React environments without requiring 'use client' directives. The component automatically detects hook availability and adapts its behavior accordingly:MarkdownProviderandMarkdownContextgracefully become no-ops in RSC environmentsThis enables better bundle splitting and SSR performance by allowing markdown rendering to happen on the server when possible.
Patch Changes
d2075d2: Fix hard line breaks (two trailing spaces) inside list items not being converted to<br/>.In v9, hard line breaks inside list items were being lost because the first line content and continuation lines were being parsed separately, causing the trailing spaces before the newline to be stripped before the hard break could be detected.
The fix ensures that for tight list items (without blank lines), simple text continuation lines are collected and concatenated with the first line content before parsing. This preserves the trailing spaces + newline sequence that triggers hard break detection.
This fix also handles hard line breaks inside blockquotes that are nested within list items, ensuring the blockquote continuation lines are properly collected together.
Fixes #766.
v9.4.2Compare Source
Patch Changes
775b4bf: ExposeparserandRuleTypefrom the markdown entry point as documented.v9.4.1Compare Source
Patch Changes
7ee8a22: EnsurerenderRulealways executes before any other rendering code across all renderers. TherenderRulefunction now has full control over node rendering, including normally-skipped nodes likeref,footnote, andfrontmatter. Additionally,renderChildrenin the markdown renderer now invokesrenderRulefor recursively rendered child nodes, ensuring consistent behavior when customizing rendering logic.7ee8a22: HTML blocks are now always fully parsed into the ASTchildrenproperty, even when marked asverbatim. Theverbatimflag now acts as a rendering hint rather than a parsing control. Default renderers still userawTextfor verbatim blocks (maintaining CommonMark compliance), butrenderRuleimplementations can now access the fully parsed AST inchildrenfor all HTML blocks. ThenoInnerParseproperty has been replaced withverbatimfor clarity.7ee8a22: AddHTMLNode.rawTextfield for consistency withrawAttrs. TherawTextfield contains the raw text content for verbatim HTML blocks, whilechildrencontains the parsed AST. Thetextproperty is now deprecated and will be removed in a future major version. Both fields are set to the same value for backward compatibility.v9.4.0Compare Source
Minor Changes
c1be885: Added context providers and memoization to all major renderers for better developer experience and performance.React:
MarkdownContext- React context for default optionsMarkdownProvider- Provider component to avoid prop-drillinguseMemo- 3-stage memoization (options, content, JSX)React Native:
MarkdownContext- React context for default optionsMarkdownProvider- Provider component to avoid prop-drillinguseMemo- 3-stage memoization (options, content, JSX)Vue:
MarkdownOptionsKey- InjectionKey for provide/inject patternMarkdownProvider- Provider component using Vue's providecomputed- Reactive memoization for options, content, and JSXBenefits:
Example:
ef8a002: Added opt-inoptions.evalUnserializableExpressionsto eval function expressions and other unserializable JSX props from trusted markdown sources.This option uses
eval()and should ONLY be used with completely trusted markdown sources (e.g., your own documentation). Never enable this for user-submitted content.Usage:
Safer alternative: Use
renderRuleto handle stringified expressions on a case-by-case basis with your own validation and allowlists.See the README for detailed security considerations and safe alternatives.
ef8a002: JSX prop values are now intelligently parsed instead of always being strings:JSON.parse():data={[1, 2, 3]}→attrs.data = [1, 2, 3]enabled={true}→attrs.enabled = trueonClick={() => ...}→attrs.onClick = "() => ..."value={someVar}→attrs.value = "someVar"The original raw attribute string is preserved in the
rawAttrsfield.Benefits:
Example:
Security: Functions remain as strings by default. Use
renderRulefor case-by-case handling, or see the newoptions.evalUnserializableExpressionsfeature for opt-in eval (not recommended for user inputs).Patch Changes
ef8a002: JSX components with double-newlines (blank lines) between opening and closing tags now properly nest children instead of creating sibling nodes. This fixes incorrect AST structure for JSX/MDX content.Before:
Parsed as 3 siblings:
<Figure>,<div>,</Figure>After:
Parsed as parent-child:
<Figure>contains<div>as a childThis was a bug where the parser incorrectly treated JSX components as siblings when double-newlines were present between the tags. The fix ensures proper parent-child relationships match expected JSX/MDX semantics.
v9.3.5Compare Source
Patch Changes
08dfe8a: Fix regression: Tables within list items are now properly parsed.v9.3.4Compare Source
Patch Changes
c5b6259: Fixed URIError when parsing HTML attributes containing the % character (e.g.,width="100%"). The parser now gracefully handles invalid URI encodings in attribute values instead of throwing an error.v9.3.3Compare Source
Patch Changes
7ac3408: Restore angle-bracket autolinks when raw HTML parsing is disabled so<https://...>still renders as links7ac3408: Improve autolink parsing: stricter angle controls, domain underscore validation, and added coverage for mailto labels and raw-HTML-disabled cases.v9.3.2Compare Source
Patch Changes
a84c300: Ensure Solid renderer uses Solid's hyperscript runtime so JSX returns real elements instead of[object Object]placeholdersv9.3.1Compare Source
Patch Changes
c1b0ea2: Fix unintended node-specific code from entering browser bundles by changing build target from 'node' to 'browser'v9.3.0Compare Source
Minor Changes
a482de6: Add SolidJS integration with full JSX output support. Includes compiler, parser, astToJSX, and Markdown component with reactive support via signals/accessors.f9a8fca: Add Vue.js 3+ integration. Includescompiler,parser,astToJSX, andMarkdowncomponent. Vue uses standard HTML attributes (class, not className) with minimal attribute mapping (only 'for' -> 'htmlFor').Patch Changes
2bb3f2b: Fix AST and options mutation bugs that could cause unexpected side effects when using memoization or reusing objects across multiple compiler calls.v9.2.0Compare Source
Minor Changes
88d4b1f: Add comprehensive React Native support with new/nativeexport. Includes:img→Image, block elements (div,section,article,blockquote,ul,ol,li,table, etc.) →View, and inline elements →TextonLinkPressandonLinkLongPresscallbacks, defaulting toLinking.openURLNativeStyleKeytype system with styles for all markdown elements and HTML semantic tagsaccessibilityLabelfor images and proper link handlingNativeOptionsandNativeStyleKeytypesReact Native is an optional peer dependency, making this a zero-dependency addition for existing users.
v9.1.2Compare Source
Patch Changes
f93214a: Fix infinite recursion when usingforceBlock: truewith empty unclosed HTML tagsWhen
React.createElement(Markdown, {options: {forceBlock: true}}, '<var>')was called with an empty unclosed tag, it would cause infinite recursion. The parser would set thetextfield to the opening tag itself (e.g.,<var>), which would then be parsed again in the rendering phase, causing recursion.This fix adds detection in
createVerbatimHTMLBlockto detect whenforceBlockis used and the text contains just the opening tag (empty unclosed tag), rendering it as an empty element to prevent recursion.v9.1.1Compare Source
Patch Changes
733f10e: Fix lazy continuation lines for list items when continuation text appears at base indentation without a blank line. Previously, continuation text was incorrectly appended inline to the list item. Now both the existing inline content and the continuation text are properly wrapped in separate paragraphs.v9.1.0Compare Source
Minor Changes
0ba757d: AddpreserveFrontmatteroption to control whether YAML frontmatter is rendered in the output. When set totrue, frontmatter is rendered as a<pre>element in HTML/JSX output. For markdown-to-markdown compilation, frontmatter is preserved by default but can be excluded withpreserveFrontmatter: false.preserveFrontmatter: truepreserveFrontmatter: false<pre>elementPatch Changes
f945132: Fix lazy continuation lines for list items when continuation text appears at base indentation without a blank line before it. Previously, such lines were incorrectly parsed as separate paragraphs instead of being appended to the list item content.36ef089: yWork around a bundling bug with exporting TypeScript namespaces directly. Bonus: MarkdownToJSX is now declared ambiently so you may not need to import it.v9.0.0Compare Source
Major Changes
1ce83eb: Complete GFM+CommonMark specification compliance<script>,<iframe>, etc.) in both HTML string output and React JSX outputjavascript:,vbscript:, and maliciousdata:URLsDefault filtering of dangerous HTML tags:
<script>,<iframe>,<object>,<embed><title>,<textarea>,<style>,<xmp><plaintext>,<noembed>,<noframes>Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.