summaryrefslogtreecommitdiff
path: root/vendor/github.com/charmbracelet/x/cellbuf/link.go
blob: 112f8e8ab662dec05e94984d04c58415a74d0433 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package cellbuf

import (
	"github.com/charmbracelet/colorprofile"
)

// Convert converts a hyperlink to respect the given color profile.
func ConvertLink(h Link, p colorprofile.Profile) Link {
	if p == colorprofile.NoTTY {
		return Link{}
	}

	return h
}