Add clickable hyperlinks when URLs are on screen
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
Research direction
Start in TextBuffer::render and inspect the existing searching functionality. Review the OSC hyperlink example and the linked URL-regex reference, then determine how URLs spanning rendered lines should be handled. Done means URLs shown in the terminal are wrapped with OSC hyperlink sequences while preserving the displayed URL text.
Written by the indexing model from the issue text.
Description
I noticed that in some terminals like Gnome, printed URLs become clickable from within the GUI. I know that you can use the following with an OSC sequence to make a clickable URL:
printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
When this is split across multiple lines, more sequences can be attached. That "This is a link" text could very easily be replaced with the URL itself again to act as [http://example.com](http://example.com) does in markdown.
Somewhere in TextBuffer::render, you could leverage the searching functionality you already have to compare against some URL regex found online (see here) and then inject this additional OSC sequence to be printed to the TTY.
- Dominant language
- Rust
- Stars
- 14.6k
- Forks
- 735
- Avg merge
- 21h 38m
- Merged PRs (30d)
- 10
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/edit
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
microsoft/edit#367 · 2 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
microsoft/edit#948 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 75/100
microsoft/edit#947 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
microsoft/edit#928 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
microsoft/edit#904 · 2 reactions ·
Maintainers usually reply within 1 day
Similar issues
-
area:release bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
registrystack/registry-stack#1874 ·
Maintainers usually reply within 1 day
-
component:midnight-toolkit status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
midnightntwrk/midnight-node#2237 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day