fix(deps): update dependency markdown-to-jsx to v9#405
Merged
marcinkrasowski merged 1 commit intomainfrom Jan 22, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
|
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
1507180 to
3d406f6
Compare
3d406f6 to
7969e61
Compare
7969e61 to
07524c9
Compare
07524c9 to
ccfd26a
Compare
ccfd26a to
d4991ac
Compare
d4991ac to
cb4c2ea
Compare
cb4c2ea to
5534630
Compare
5534630 to
6950f8c
Compare
6950f8c to
c842be5
Compare
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.
This PR contains the following updates:
^8.0.0→^9.6.0Release Notes
quantizor/markdown-to-jsx (markdown-to-jsx)
v9.6.0Compare Source
Minor Changes
a97e2bf: AddoptimizeForStreamingoption to suppress incomplete syntax during streaming. When enabled, incomplete inline code, links, emphasis, and other markdown syntax is hidden cleanly as characters arrive, preventing visual artifacts and flickering. Particularly useful for AI-powered streaming applications.v9.5.7Compare Source
Patch Changes
4252da4: Fixed inconsistent spacing between list item nodes when continuation lines have indentation equal to the nested list marker. Previously, text nodes in list items were being concatenated without newlines when continuation lines matched the list's base indentation, causing missing line breaks in the rendered output.v9.5.6Compare Source
Patch Changes
13bdaf7: Fixed HTML tags with attributes spanning multiple lines being incorrectly parsed.Previously, HTML tags with attributes on separate lines (like
<dl-custom\n data-variant='horizontalTable'\n>) would have their attributes incorrectly parsed, sometimes causing duplicate tags or missing attribute values. This fix ensures that newlines between HTML attributes are properly recognized as whitespace separators.修复了属性跨多行的 HTML 标签解析不正确的问题。
之前,属性位于单独行上的 HTML 标签(如
<dl-custom\n data-variant='horizontalTable'\n>)的属性解析不正确,有时会导致重复的标签或缺失属性值。此修复确保 HTML 属性之间的换行符被正确识别为空白分隔符。कई पंक्तियों में फैले एट्रिब्यूट वाले HTML टैग्स के गलत पार्सिंग को ठीक किया।
पहले, अलग-अलग पंक्तियों पर एट्रिब्यूट वाले HTML टैग्स (जैसे
<dl-custom\n data-variant='horizontalTable'\n>) के एट्रिब्यूट गलत तरीके से पार्स होते थे, जिससे कभी-कभी डुप्लिकेट टैग्स या गायब एट्रिब्यूट वैल्यू होते थे। यह फिक्स सुनिश्चित करता है कि HTML एट्रिब्यूट के बीच न्यूलाइन को व्हाइटस्पेस सेपरेटर के रूप में सही ढंग से पहचाना जाता है।13bdaf7: Thetextfield in HTML AST nodes now contains cleaned inner content without opening/closing tags. UserawTextfor full raw HTML. This affects customrenderRuleimplementations that rely on thetextfield.HTML AST 节点中的
text字段现在包含不带开/闭标签的清理后内容。使用rawText获取完整原始 HTML。这会影响依赖text字段的自定义renderRule实现。HTML AST नोड्स में
textफ़ील्ड अब ओपनिंग/क्लोज़िंग टैग्स के बिना साफ़ इनर कंटेंट रखता है। पूर्ण raw HTML के लिएrawTextका उपयोग करें। यह उन कस्टमrenderRuleकार्यान्वयनों को प्रभावित करता है जोtextफ़ील्ड पर निर्भर हैं।v9.5.5Compare Source
Patch Changes
76b7f12: Fix multi-line HTML tag attribute parsing (#781)HTML tags with attributes spanning multiple lines were not having their attributes correctly parsed into the AST. This caused custom elements with multi-line
data-*attributes to have emptyattrsobjects, and the React compiler would then duplicate the opening tag when rendering.This fix ensures:
childrenarray instead of re-parsingrawTextwhen attributes are already parsed修复多行 HTML 标签属性解析问题(#781)
具有跨多行属性的 HTML 标签没有正确将其属性解析到 AST 中。这导致具有多行
data-*属性的自定义元素具有空的attrs对象,然后 React 编译器在渲染时会重复开始标签。此修复确保:
children数组而不是重新解析rawTextबहु-पंक्ति HTML टैग विशेषता पार्सिंग ठीक करें (#781)
कई पंक्तियों में फैले विशेषताओं वाले HTML टैग अपनी विशेषताओं को AST में सही ढंग से पार्स नहीं कर रहे थे। इससे बहु-पंक्ति
data-*विशेषताओं वाले कस्टम तत्वों में खालीattrsऑब्जेक्ट थे, और फिर React कंपाइलर रेंडरिंग करते समय आरंभिक टैग को दोहरा देता था।यह सुधार सुनिश्चित करता है:
rawTextको दोबारा पार्स करने के बजाय पार्स किए गएchildrenसरणी का उपयोग करता हैv9.5.4Compare Source
Patch Changes
7f724a6: Fix HTML block parsing for sibling elements like<dt>/<dd>without blank lines between them.Type 6 HTML blocks (such as
<dl>,<dt>,<dd>,<table>,<tr>,<td>) were incorrectly parsed when sibling elements appeared without blank lines between them—the first element would consume all subsequent siblings as its content instead of treating them as separate elements.This fix adds nesting-aware closing tag detection that properly handles:
<div><div></div></div>)<dt></dt><dd></dd>)修复了没有空行分隔的兄弟 HTML 元素(如
<dt>/<dd>)的块解析问题。类型 6 HTML 块(如
<dl>、<dt>、<dd>、<table>、<tr>、<td>)在兄弟元素之间没有空行时解析错误——第一个元素会将所有后续兄弟元素作为其内容,而不是将它们视为单独的元素。此修复添加了具有嵌套感知的关闭标签检测,正确处理:
<div><div></div></div>)<dt></dt><dd></dd>)रिक्त पंक्तियों के बिना भाई HTML तत्वों (जैसे
<dt>/<dd>) के लिए HTML ब्लॉक पार्सिंग को ठीक किया।टाइप 6 HTML ब्लॉक (जैसे
<dl>,<dt>,<dd>,<table>,<tr>,<td>) गलत तरीके से पार्स हो रहे थे जब भाई तत्व बिना रिक्त पंक्तियों के दिखाई देते थे—पहला तत्व सभी अनुवर्ती भाई तत्वों को अपनी सामग्री के रूप में शामिल कर लेता था, उन्हें अलग तत्वों के रूप में मानने के बजाय।यह सुधार नेस्टिंग-जागरूक क्लोजिंग टैग पहचान जोड़ता है जो सही ढंग से संभालता है:
<div><div></div></div>)<dt></dt><dd></dd>)58010ce: Fix duplicate opening tags for HTML elements with multi-line attributes (#781)HTML tags with attributes spanning multiple lines (like custom elements with
data-*attributes on separate lines) no longer produce duplicate opening tags in the output. This restores the expected behavior for custom HTML elements used with component overrides.修复多行属性的 HTML 元素产生重复开始标签的问题(#781)
具有跨多行属性的 HTML 标签(例如在不同行上具有
data-*属性的自定义元素)不再在输出中产生重复的开始标签。这恢复了与组件覆盖一起使用的自定义 HTML 元素的预期行为。बहु-पंक्ति विशेषताओं वाले HTML तत्वों के लिए दोहरे आरंभिक टैग ठीक करें (#781)
कई पंक्तियों में फैली विशेषताओं वाले HTML टैग (जैसे अलग-अलग पंक्तियों पर
data-*विशेषताओं वाले कस्टम तत्व) अब आउटपुट में दोहरे आरंभिक टैग उत्पन्न नहीं करते। यह कंपोनेंट ओवरराइड के साथ उपयोग किए जाने वाले कस्टम HTML तत्वों के अपेक्षित व्यवहार को पुनर्स्थापित करता है।3e25913: Fix fenced code blocks consuming nested code block openings as content.When a fenced code block with a language (e.g.,
```markdown) encountered another code block opening with a language (e.g.,```python) inside it, the inner opening was incorrectly treated as content instead of being recognized as a new block. Now, fence lines with a language immediately following (no space between fence and language) are recognized as new block openings that implicitly close the previous block.This matches behavior of other markdown renderers like GitHub and VSCode. Lines like
``` aaa(with space before info string) remain treated as content per CommonMark spec.修复了围栏代码块将嵌套代码块开头作为内容消费的问题。
当带有语言的围栏代码块(例如
```markdown)内部遇到另一个带语言的代码块开头(例如```python)时,内部开头被错误地视为内容,而不是被识别为新块。现在,语言紧随其后(围栏和语言之间没有空格)的围栏行被识别为隐式关闭前一个块的新块开头。这与 GitHub 和 VSCode 等其他 markdown 渲染器的行为一致。按照 CommonMark 规范,像
``` aaa(信息字符串前有空格)这样的行仍被视为内容。फेंस्ड कोड ब्लॉक्स द्वारा नेस्टेड कोड ब्लॉक ओपनिंग को सामग्री के रूप में उपभोग करने की समस्या को ठीक किया।
जब भाषा वाला फेंस्ड कोड ब्लॉक (जैसे
```markdown) के अंदर भाषा वाला दूसरा कोड ब्लॉक ओपनिंग (जैसे```python) आता था, तो आंतरिक ओपनिंग को नए ब्लॉक के रूप में पहचानने के बजाय गलती से सामग्री के रूप में माना जाता था। अब, भाषा तुरंत बाद आने वाली (फेंस और भाषा के बीच कोई स्पेस नहीं) फेंस लाइनें नए ब्लॉक ओपनिंग के रूप में पहचानी जाती हैं जो पिछले ब्लॉक को निहित रूप से बंद करती हैं।यह GitHub और VSCode जैसे अन्य markdown रेंडरर के व्यवहार से मेल खाता है। CommonMark स्पेक के अनुसार
``` aaa(इन्फो स्ट्रिंग से पहले स्पेस) जैसी लाइनें अभी भी सामग्री के रूप में मानी जाती हैं।v9.5.3Compare Source
Patch Changes
8528325: Add CommonMark-compliant text normalization for null bytes and BOMPer CommonMark security specification, null bytes (U+0000) are now replaced with the replacement character (U+FFFD) instead of passing through unchanged. Additionally, the Byte Order Mark (U+FEFF) is now stripped when it appears at the start of a document, as specified in the CommonMark spec.
These changes improve spec compliance and security. Most documents are unaffected due to fast-path optimization that skips processing when no special characters are present.
v9.5.2Compare Source
Patch Changes
282affe: Fix lists and other markdown structures not rendering correctly when input has CRLF line endings.282affe: Fix paragraph after nested list being incorrectly absorbed into the nested list item when followed by a blank line.v9.5.1Compare Source
Patch Changes
fa21868: Add Chinese (Mandarin) JSDoc documentation to all public APIs. All exported functions, types, interfaces, and components now include bilingual documentation using the@lang zhtag for Simplified Chinese translations, improving developer experience for Chinese-speaking users.fa21868: Add Hindi (हिन्दी) language support for internationalization. Includes full translations of documentation (README, markdown spec, GFM spec, interactive demo template), UI strings, and JSDoc translations for all public APIs using the@lang hitag. Hindi is now the third supported language after English and Mandarin Chinese, following global speaker rankings (Ethnologue 2025).897c4c2: Automatic browser bundle optimization via conditional exports. Browser builds now automatically use DOM-based entity decoding (textarea.innerHTML) instead of shipping the full ~11KB entity lookup table, reducing gzipped bundle size by ~11KB.This optimization is automatic for bundlers that support the
importsfield withbrowsercondition (Webpack 5+, Vite, esbuild, Rollup, Parcel). No configuration required.Server-side/Node.js builds retain the full O(1) entity lookup table for maximum performance.
This feature uses the
importsfield in package.json. All modern bundlers support this field (Webpack 5+, Vite, esbuild, Rollup, Parcel).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.