Skip to content

[Bug][Mobile]: A table right after a line of text renders as a run-on paragraph #20115

Closed

Description

@nabettu

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/mobile

Steps to reproduce

  1. Have an agent reply with a table placed directly under a line of text, with no blank line between them:

    Companies we already have on file
    | Company | Fit | Contact |
    |---|---|---|
    | Acme | A | email |
    | Globex | B | form |
  2. Open the thread in the mobile app.

Expected behavior

The table renders as a table, as it does on web and desktop. GFM lets a table interrupt a paragraph (the line before the delimiter row is the header row), and agents often write tables this way.

Actual behavior

On mobile the whole block renders as one paragraph. The soft line breaks become spaces, so rows run together as | Acme | A | email | | Globex | B | form |.

Cause: mobile parses Markdown with md4c (vendored in react-native-enriched-markdown). md4c only accepts a table delimiter row when the current paragraph has exactly one line (cpp/md4c/md4c.c, ctx->current_block->n_lines == 1 && md_is_table_underline(...)). With a lead-in line, the paragraph already has two lines when the delimiter row arrives, so md4c never starts a table. Web uses remark-gfm, which handles this case.

Adding a blank line between the text and the table makes mobile render it correctly.

Impact

Agent replies that contain tables are hard to read on mobile. The model decides whether to add the blank line, so this happens regularly with no way for the user to fix it.

Version or commit

main @ b67ac65 (react-native-enriched-markdown-1.2.0-t3.13)

Environment

iOS app, Claude provider

Workaround

Ask the agent to put a blank line before tables.

Activity

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