Skip to content

Auto-detected links with new lines result in 404s when clicked #3718

Description

@heaths

Describe the bug

In gh 1.10.3 links in comments that span new lines are detected as a broken link by terminals like Windows Terminal 1.8 that support detecting URLs.

Steps to reproduce the behavior

  1. Type gh pr -R cli/cli view 3519 --comments
  2. Find the comment with an image and click on the link.
  3. The link results in a 404

image

The detected link here is only https://user-images.githubusercontent.com/1532486/116502954 which 404s. Windows Terminal 1.8 does properly detect continuous URLs that wrap lines, so I suspect this has more to do with the break in the link for formatting purposes:

image

The rendering is done by github.com/yuin/goldmark which is currently only applying coloring for rendered markdown, and I've opened more of a feature request for OSC 8 support. This might be more of a tracking bug until that issue is resolved, but I wanted to note the current behavior.

Expected vs actual behavior

Rendered links in the output are clickable and result in the proper resource being fetched.

Logs

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-issuerelating to the gh issue commandgh-prrelating to the gh pr commandpriority-3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions