Skip to content

Commit d528c8c

Browse files
Version Packages (#769)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 7605d88 commit d528c8c

File tree

4 files changed

+28
-29
lines changed

4 files changed

+28
-29
lines changed

.changeset/add-rsc-support.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

.changeset/fix-hard-line-breaks-in-lists.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# markdown-to-jsx
22

3+
## 9.5.0
4+
5+
### Minor Changes
6+
7+
- 7605d88: Add React Server Components (RSC) support with automatic environment detection.
8+
9+
The `Markdown` component 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:
10+
- In RSC environments: Uses direct compilation without hooks for optimal server performance
11+
- In client environments: Uses hooks and memoization for optimal client performance
12+
- `MarkdownProvider` and `MarkdownContext` gracefully become no-ops in RSC environments
13+
- Maintains identical output and API in both contexts
14+
- Zero breaking changes for existing users
15+
16+
This enables better bundle splitting and SSR performance by allowing markdown rendering to happen on the server when possible.
17+
18+
### Patch Changes
19+
20+
- d2075d2: Fix hard line breaks (two trailing spaces) inside list items not being converted to `<br/>`.
21+
22+
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.
23+
24+
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.
25+
26+
This fix also handles hard line breaks inside blockquotes that are nested within list items, ensuring the blockquote continuation lines are properly collected together.
27+
28+
Fixes #766.
29+
330
## 9.4.2
431

532
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "A very fast and versatile markdown toolchain. AST, React, React Native, SolidJS, Vue, Markdown, and HTML output available with full customization.",
44
"homepage": "https://markdown-to-jsx.quantizor.dev",
55
"license": "MIT",
6-
"version": "9.4.2",
6+
"version": "9.5.0",
77
"publishConfig": {
88
"access": "public",
99
"mangle": {

0 commit comments

Comments
 (0)