Pick up new version of Glamour to avoid breaking hyperlinks

Open Beginner friendly
#188 9 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
66/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go
Domain
cli

Research direction

The issue names no files or tests. Start by locating the Glamour dependency and the markdown-rendering entry point, then check the upstream release containing pull request #411. Update the dependency and verify that hyperlinks wrapping across lines are no longer broken.

Written by the indexing model from the issue text.

Description

enhancement
Describe the feature or problem you’d like to solve

When rendering markdown, hyperlinks that wrap or are cut off get broken, such that a line with "https://git" and another with "hub.com/cli/cli" will have at least one link that doesn't work (or, worse, goes somewhere NSFW, etc.) and another line that probably won't be recognized as a link.

Fortunately, this issue was fixed in Glamour: https://github.com/charmbracelet/glamour/pull/411

Once they cut a new release, it would be great to pick that up.
 
While I thought I opened or commented on a bug on this, I can't seem to find it. Apologies if it's dup'd.

Proposed solution

Hyperlinks in rendered markdown aren't broken if they wrap lines or are otherwise cut off.

Additional context

This is unrelated to years-long discussions on hyperlinks (OSC8) printed directly by gh, though it might be worth revisiting that in 2025. At least as of 2022, the main concern seemed to be Mac's default Terminal app...though, doesn't everyone replace that with iTerm2 or something these days. 😉 (I do appreciate that problem, though).

But since you use Glamour anyway for markdown rendering, it would be good to pick this new version up to fix broken hyperlinks when it renders them.

Dominant language
Go
Stars
438
Forks
96
Avg merge
5d 13h
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cli/go-gh

All issues in cli/go-gh

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.