glamour icon indicating copy to clipboard operation
glamour copied to clipboard

Rendering links

Open juliangaal opened this issue 6 years ago • 6 comments

glow-renderer markdown files look awesome! Sometimes, when a markdown document contains a lot of links though, the output can look quite cluttered. Did you ever think about an option to not render links, just the [link description] part, in i.e. bold?

juliangaal avatar Jan 25 '20 23:01 juliangaal

I wonder if it needs to be a global option, or if a slightly modified style would already suffice here. Just to understand you completely: it sounds like you would only enable it occasionally though, when viewing messy documents?

muesli avatar Feb 10 '20 18:02 muesli

there are also escape sequences for links for certain terminals. would be cool to detect and linkify.

jedahan avatar Feb 10 '20 18:02 jedahan

I wonder if it needs to be a global option, or if a slightly modified style would already suffice here. Just to understand you completely: it sounds like you would only enable it occasionally though, when viewing messy documents?

Depends! Maybe it will look so nice, that I'll just leave link rendering (in whatever form) enabled at all times. I personally don't need to see the links all the time.

juliangaal avatar Feb 11 '20 11:02 juliangaal

You could tweak this behavior in your own style. Check out the documentation and style definitions at https://github.com/charmbracelet/glamour/tree/master/styles

muesli avatar Feb 23 '20 02:02 muesli

That very close to what I'm looking for! Thanks, will have a look at it

juliangaal avatar Feb 24 '20 11:02 juliangaal

Hi there, did you end up making your own style to add this feature?

I have a similar problem, if the link is very big, it will get split between lines and break, at least in my terminal (Kitty). Here's such a case: image

As you can see the squiggly line is only under the first part of the broken link.

Could this be solved with a custom theme, or would it just decrease the odds of something like this happening because usually the text is smaller than the hyperlinks?

jpmvferreira avatar Dec 28 '21 12:12 jpmvferreira