-
Notifications
You must be signed in to change notification settings - Fork 245
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
The following markdown
## Test
- hellow
- world
is rendered as
(Each list item is wrapped into paragraph)
But must be
Test
-
hellow
-
world
Steps to Reproduce
// streamdown-ssr.mjs
import React from "react";
import { renderToString } from "react-dom/server";
import { Streamdown } from "streamdown";
const text = `
## Test
- hellow
- world
`;
const html = renderToString(React.createElement(Streamdown, { mode: "static" }, text));
process.stdout.write(html + "\n");run node streamdown-ssr.mjs
see output
<div class="space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0"><h2 class="mt-6 mb-2 font-semibold text-2xl" data-streamdown="heading-2">Test</h2>
<ul class="list-inside list-disc whitespace-normal [li_&]:pl-6" data-streamdown="unordered-list">
<li class="py-1 [&>p]:inline" data-streamdown="list-item">
<p>hellow</p>
</li>
<li class="py-1 [&>p]:inline" data-streamdown="list-item">
<p>world</p>
</li>
</ul></div>Expected Behavior
Output must be
<div class="space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0"><h2 class="mt-6 mb-2 font-semibold text-2xl" data-streamdown="heading-2">Test</h2>
<ul class="list-inside list-disc whitespace-normal [li_&]:pl-6" data-streamdown="unordered-list">
<li class="py-1 [&>p]:inline" data-streamdown="list-item">hellow</li>
<li class="py-1 [&>p]:inline" data-streamdown="list-item">world</li>
</ul></div>Actual Behavior
Modern models often adds unusual \n between list items. But we got broken rendering
Streamdown Version
2.5.0
React Version
19+
Node.js Version
24
Browser(s)
Chrome
Operating System
macOS
Additional Context
Reproduced in Node, browsers, nextjs etc
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working