Skip to content

Long URLs in markdown tables are split across lines and become unclickable #18394

Closed as not planned

Description

@nickveenhof

Problem

When a URL in a markdown table cell is longer than the column width, it gets split across multiple lines to fit. The split breaks the clickable link. Short URLs that fit in one line work fine.

Steps to reproduce

Have the assistant return a markdown table with long URLs:

Paste this into a new opencode session:
Return this exact markdown table, nothing else:
| Link | Description | Status |
|------|-------------|--------|
| [MCP servers #3653](https://github.com/modelcontextprotocol/servers/pull/3653) | Fix missing trailing newline in JSONL output that breaks memory server when file is appended to by concurrent processes | Open, waiting for maintainer review |
| [Opencode #18394](https://github.com/anomalyco/opencode/issues/18394) | Long URLs in markdown table cells get split across lines and become unclickable in the terminal | Open, filed today after tracing through OpenTUI rendering chain |
| [MCP servers #3286](https://github.com/modelcontextprotocol/servers/pull/3286) | Add cross-process file locking to memory server using proper-lockfile to prevent race condition corruption | Open, addresses the root cause behind issue 2579 |

The short URL is clickable. The long URL is split across lines and not clickable.

Image

Expected

Long URLs remain clickable even when the table column is too narrow to display them on one line. Either via OSC 8 wrapping the full URL across the line break, or by rendering URLs outside the table (footnote style).

Environment

  • opencode v1.2.27
  • @opentui/core 0.1.87
  • iTerm2 3.6.8 (supports OSC 8)

Relevant upstream work

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Mar 20, 2026
  2. changed the title [-]Bare URLs in markdown tables are not clickable[/-] [+]Long URLs in markdown tables are split across lines and become unclickable[/+] on Mar 20, 2026
  3. countzero commented on Mar 24, 2026

    @countzero

    I can confirm this bug. I am also missing the default concealment of the URL. That should be fixed by anomalyco/opentui#866 but then there would be another problem.

    It seems as if currently the label of a markdown link is not clickable. If the concealment is fixed without fixing anomalyco/opentui#869 the link would become unreachable via Ctrl+Click.

  4. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
  5. hackerh3 commented on May 11, 2026

    @hackerh3

    Related issue found: bare URLs in markdown (not just tables) are rendered as url (url) due to MarkdownRenderable in @opentui/core.

    Root cause: The "link" case in renderInlineToken unconditionally appends (href) when conceal=true (the default). For bare/autolinked URLs, the link text equals the href, producing duplication like https://example.com (https://example.com).

    Fix: Skip the (href) suffix when linkText === token.href. Filed upstream: anomalyco/opentui#1050

    This affects all bare URLs in rendered markdown, but is most visible in tables where column width is limited.

  6. github-actions commented on Jul 11, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

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