feature: Option to toggle between Link Text only and Link Text + URL …#204
Open
deicon wants to merge 1 commit intocharmbracelet:masterfrom
Open
feature: Option to toggle between Link Text only and Link Text + URL …#204deicon wants to merge 1 commit intocharmbracelet:masterfrom
deicon wants to merge 1 commit intocharmbracelet:masterfrom
Conversation
Author
|
Maybe some help for #178 |
This was referenced Nov 18, 2022
|
Just tested your feature addition (I'm working on a Thus far, it only prints the text sans the link. Is there a plan to make it so the text can actually be clicked/is acting as the link? |
Author
|
I would love to add the link feature as feature. If this change makes it through, I would look into it as well. |
Author
|
@markusbkk In fact github.com/muesli/termenv already contains all there is to it to enable clickable links as far as I can tell. https://github.com/muesli/termenv/blob/5670c9af724c0f24acef0a7a8d811f6cc9290b83/hyperlink.go |
|
Clickable links are made simply with OSC8 escape sequence This can be a super simple change |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preparing glamour to be configured to render links using the link text only or the Link text and url.
Ideally in another PR this would be extended to display clickable Link Texts whenever possible.
When using glow as a quick reader of markdown files, it seems natural to hide the urls, as this is the expected behaviour of a markdown viewer.