jesseduffield.lazygit/vendor/github.com/muesli/termenv/hyperlink.go
Jesse Duffield 3a191b913f Add release notes popup after update
We're using glamour for rendering the markdown, and I'm interested in using it in other places
too
2024-01-13 19:26:26 +11:00

16 lines
334 B
Go

package termenv
import (
"fmt"
)
// Hyperlink creates a hyperlink using OSC8.
func Hyperlink(link, name string) string {
return output.Hyperlink(link, name)
}
// Hyperlink creates a hyperlink using OSC8.
func (o *Output) Hyperlink(link, name string) string {
return fmt.Sprintf("\x1b]8;;%s\x1b\\%s\x1b]8;;\x1b\\", link, name)
}