-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions welcomeContributions welcomepriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
Using gh to browse a file with given line number does not work with Markdown files. The URL the user is taken to is the rendered Markdown view without line numbers on the left-hand side.
Steps to reproduce the behavior
$ gh browse README.md:3
now opening https://github.com/cli/cli/tree/trunk/README.md#L3 in browser
$ gh --version
gh version 2.0.0 (2021-08-24)
https://github.com/cli/cli/releases/tag/v2.0.0
Expected vs actual behavior
Looks like a ?plain=1 parameter was added to GitHub Web UI to specifically help navigate to Markdown lines.
So, instead of:
I'd expect the user to be taken to:
note: the new URL has blob in the path because ?plain=1 does not work with tree in the path
Logs
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions welcomeContributions welcomepriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic