Skip to content

Reference links with a definition in another block are not resolved, and loose lists render as tight #665

Closed

Description

@anzal1

Bug Description

Splitting the message into blocks and parsing each block on its own changes the result for two common markdown shapes, compared with parsing the whole message (what react-markdown does with the same remark-gfm setup):

  1. A reference-style link whose definition is in another block is not resolved, so users see the raw [the docs][1] text.
  2. A loose list (blank lines between items) is rendered as a tight list: the items lose their <p> wrappers.

Footnotes defined in a later paragraph do work, so I think only reference definitions and list looseness are affected.

Steps to Reproduce

Render these with <Streamdown parseIncompleteMarkdown={false}> and with <ReactMarkdown remarkPlugins={[remarkGfm]}>:

See [the docs][1] for details.

More text here.

[1]: https://example.com/docs
- one

- two

- three

Expected Behavior

The same structure as a whole-document parse: a link to https://example.com/docs, and list items wrapped in <p> (as react-markdown renders them).

Actual Behavior

  • <p>See [the docs][1] for details.</p>, no link, and the definition line is dropped.
  • <li>one</li><li>two</li><li>three</li> with no paragraph wrappers.

Code Sample

import { renderToStaticMarkup } from 'react-dom/server'
import ReactMarkdown from 'react-markdown'
import remarkGfm from 'remark-gfm'
import { Streamdown } from 'streamdown'

const md = 'See [the docs][1] for details.\n\nMore text here.\n\n[1]: https://example.com/docs\n'
console.log(renderToStaticMarkup(<ReactMarkdown remarkPlugins={[remarkGfm]}>{md}</ReactMarkdown>)) // link resolved
console.log(renderToStaticMarkup(<Streamdown parseIncompleteMarkdown={false}>{md}</Streamdown>))    // raw [the docs][1]

Streamdown Version

2.7.0

React Version

19.3.0

Node.js Version

24.20.0

Browser(s)

Reproduced with server rendering (renderToStaticMarkup), so not browser specific.

Operating System

macOS

Activity

  1. DevVettel commented on Oct 11, 2026

    @DevVettel
    Contributor

    Opened #666 for the reference link part. The loose list part looks intentional since #476, so I left it out — details in the PR.

  2. added a commit that references this issue on Oct 11, 2026
    9265f92
  3. anzal1 commented on Oct 11, 2026

    @anzal1
    Author

    Thanks for picking this up. You're right about the loose lists, I missed that #476 unwraps them on purpose, so only the reference link part was a real bug. #666 looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions