# New npm package for automatic recovery of broken streaming markdown

By Steven Van · 2025-12-03

Remend, the Markdown-repair logic behind Vercel's Streamdown, is now a separate npm package for any app.

Remend, Vercel's library for repairing incomplete Markdown mid-stream, is now available as a standalone package. It was previously built into [Vercel](<https://creatorstoolbox.com/tools/vercel>)'s Streamdown project as part of its Markdown termination logic.

AI models stream Markdown token by token, which often leaves syntax incomplete: unclosed code fences, half-finished bold or italic markers, unterminated links or lists. Left alone, these patterns fail to render, leak raw Markdown, or break the page layout. Remend detects unterminated blocks and completes them automatically, so output stays stable while streaming; when the real closing markers arrive, the content updates to match. It works as a pre-processor in front of any Markdown renderer.

The library includes rules to avoid false positives on edge cases such as underscores in LaTeX expressions, asterisks or underscores in product codes and variable names, formatting markers inside list items, and nested brackets in links. It can be installed with npm i remend, or used indirectly through Streamdown.

Read the [original announcement](<https://vercel.com/changelog/new-npm-package-for-automatic-recovery-of-broken-streaming-markdown>) for code examples.

![Vercel](<https://www.google.com/s2/favicons?domain=vercel.com&sz=128>)

Vercel

The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.

[View Vercel →](<https://creatorstoolbox.com/tools/vercel>)

[Original source](<https://vercel.com/changelog/new-npm-package-for-automatic-recovery-of-broken-streaming-markdown>)

[Read New npm package for automatic recovery of broken streaming markdown on Creators Toolbox](<https://creatorstoolbox.com/blog/vercel-new-npm-package-for-automatic-recovery-of-broken-streaming-markdown>)

---
Canonical source: https://creatorstoolbox.com/blog/vercel-new-npm-package-for-automatic-recovery-of-broken-streaming-markdown
