link.go

 1package cellbuf
 2
 3import (
 4	"github.com/charmbracelet/colorprofile"
 5)
 6
 7// Convert converts a hyperlink to respect the given color profile.
 8func ConvertLink(h Link, p colorprofile.Profile) Link {
 9	if p == colorprofile.NoTTY {
10		return Link{}
11	}
12
13	return h
14}