Skip to content

关于table结构的一个bug #937

Description

@leem0n14

Initial checklist

Affected package

react--markdown@9.1.0

Steps to reproduce

目前的场景是在做一个ai聊天的时候,ai返回的table的md格式的数据的时候可能存在两个情况,一个是因为表格内容很长,生成很多内容;第二个情况是生成到一半数据中断导致markdown的table的结构可能没有完全展示。出现这两种情况的时候,table虽然能正常渲染,但是其父盒子莫名其妙会被撑开,想请问各位有没有遇到类似的问题

Actual behavior

目前的场景是在做一个ai聊天的时候,ai返回的table的md格式的数据的时候可能存在两个情况,一个是因为表格内容很长,生成很多内容;第二个情况是生成到一半数据中断导致markdown的table的结构可能没有完全展示。出现这两种情况的时候,table虽然能正常渲染,但是其父盒子莫名其妙会被撑开,想请问各位有没有遇到类似的问题

Image

Expected behavior

正常来说,其宽度就是普通的table长度才对

Runtime

No response

Package manager

No response

Operating system

No response

Build and bundle tools

No response

Activity

  1. added
    👋 phase/newPost is being triaged automatically
    🤞 phase/openPost is being triaged manually
    and removed
    👋 phase/newPost is being triaged automatically
    on Jan 9, 2026
  2. ChristianMurphy commented on Jan 9, 2026

    @ChristianMurphy
    Member

    Welcome @leem0n14! 👋

    Just a quick note: issues and discussions in the remark organization use English, so please keep that in mind for future issues.

    Regarding the streaming markdown issue you're experiencing, streaming isn't really a concept that exists in CommonMark or markdown in general. These parsers are designed to handle complete documents, so when you feed in incomplete/partial markdown (like from a streaming LLM response), it's essentially garbage in, garbage out. See this discussion for more context: https://github.com/orgs/remarkjs/discussions/1332

    For your use case with AI chat streaming, you might want to check out Vercel's Streamdown library, which is a wrapper around remark and react-markdown specifically designed to handle the broken/incomplete markdown that LLMs produce during streaming: https://github.com/vercel/streamdown

    Hope that helps!

  3. github-actions commented on Jan 9, 2026

    @github-actions
  4. added
    👎 phase/noPost cannot or will not be acted on
    and removed
    🤞 phase/openPost is being triaged manually
    on Jan 9, 2026
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

    👎 phase/noPost cannot or will not be acted on🙋 no/questionThis does not need any changes

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions