From 4ce085cccba3fa92ac77826c3ccb729a87b5cd6d Mon Sep 17 00:00:00 2001 From: delthas Date: Mon, 17 Oct 2022 14:16:41 +0200 Subject: Fix OSC 8 hyperlink ID format I meant to add 0-padding to avoid spaces. --- ui/style.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/style.go b/ui/style.go index 506a03d..aa6683a 100644 --- a/ui/style.go +++ b/ui/style.go @@ -142,7 +142,7 @@ func (s StyledString) ParseURLs() StyledString { if u, err := url.Parse(link); err != nil || u.Scheme == "" { link = "https://" + link } - id := fmt.Sprintf("_%10d", rand.Int31()) + id := fmt.Sprintf("_%010d", rand.Int31()) // find last style starting before or at url begin for ; j < len(s.styles); j++ { st := s.styles[j] -- cgit v1.2.3