Skip to content

test: failing test for long URLs broken by table column wrapping#841

Open
nickveenhof wants to merge 2 commits intoanomalyco:mainfrom
nickveenhof:test/table-long-url-link-broken
Open

test: failing test for long URLs broken by table column wrapping#841
nickveenhof wants to merge 2 commits intoanomalyco:mainfrom
nickveenhof:test/table-long-url-link-broken

Conversation

@nickveenhof
Copy link
Copy Markdown

@nickveenhof nickveenhof commented Mar 20, 2026

Problem

Long URLs in markdown table cells get split across multiple lines when the column is too narrow. The split breaks the URL: it is no longer a single clickable string, and the rendered output shows a truncated URL on one line with the remainder on the next.

Related: anomalyco/opencode#18394

What this PR does

Adds a single failing test that reproduces the problem. No fix included.

Test output

bun test src/renderables/__tests__/Markdown.test.ts --test-name-pattern "table with long URL"

The test expects the full URL to appear intact in the rendered table. Instead, the renderer splits it:

│Exam│https://github.com/charmbracelet/glamour/issues/     │
│ple │149#issuecomment-1234567890 (https://github.com/     │
│    │charmbracelet/glamour/issues/149#issuecomment-       │
│    │1234567890)                                          │

The 74-character URL is split at the column boundary. The "Name" column value "Example" is also split into "Exam" / "ple" across rows.

Expected behavior

Long URLs should either:

  1. Remain intact as a single OSC 8 hyperlink span across the line break
  2. Be rendered as a footnote below the table
  3. Truncate with an ellipsis while keeping the full URL in the link metadata

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants