svelte-markdown
Start by passing SvelteMarkdown's string source to Fluxdown's text. Fluxdown requires Svelte 5, so check the framework version before migrating an older project.
Migrate with an agent
Send this prompt to the agent working in your project:
Replace the component
Before:
After:
The component loads its styles. Follow the styling guide to adjust themes and fonts.
Move custom renderers
Move renderers components to Slot plugins. For example, renderers.code maps to CodeBlock, and renderers.link maps to Link. Adapt the component props to types such as CodeBlockProps or LinkProps; render child content with {@render children?.()}.
Fluxdown does not accept Marked options or pre-parsed token arrays. Keep the original Markdown and implement extra syntax or tree changes with Remark or Rehype plugins. Code that builds a catalog from parsed events needs its heading handling connected again.
Fluxdown displays ordinary newlines as line breaks. Enable indented code and Setext headings if existing articles need them:
Connect streaming content
Pass accumulated text and set pending to false when the request finishes. See the svelte-markdown README for the original renderers and events.