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