Bug Description
Markdown syntax fails to render inside custom tags when content spans multiple lines
Steps to Reproduce
import { Streamdown } from "streamdown";
// ❌ FAILS: "**bold**" renders as plain text, not bold.
// The content IS inside the component (unlike the header bug), but formatting is lost.
const markdown = "<ai-thinking>\n**bold**</ai-thinking>";
// ✅ WORKS: Single line bold works perfectly.
const markdownSingle = "<ai-thinking>**bold**</ai-thinking>";
function AiThinking(props) {
return <div style={{ fontSize: 14, backgroundColor: "#3f3f3f3f" }}>{props.children}</div>;
}
export default function Demo() {
return (
<Streamdown
allowedTags={{ "ai-thinking": [] }}
components={{ "ai-thinking": AiThinking }}
>
{markdown}
</Streamdown>
);
}
Expected Behavior
When content inside a custom tag contains newlines, the parser should recursively process the inner content as standard Markdown.
Actual Behavior
Markdown syntax fails to render inside custom tags
Code Sample
Streamdown Version
2.5.0
React Version
18
Node.js Version
22
Browser(s)
No response
Operating System
None
Additional Context
No response
Bug Description
Markdown syntax fails to render inside custom tags when content spans multiple lines
Steps to Reproduce
Expected Behavior
When content inside a custom tag contains newlines, the parser should recursively process the inner content as standard Markdown.
Actual Behavior
Markdown syntax fails to render inside custom tags
Code Sample
Streamdown Version
2.5.0
React Version
18
Node.js Version
22
Browser(s)
No response
Operating System
None
Additional Context
No response