From ede1dd5ee68071a873d425e749bcbde04f1a1cc3 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Mon, 17 Oct 2022 08:30:19 -0500 Subject: [PATCH] hyperlinks: fix id escape format Commit 43efca775e73 added support for url IDs within OSC8 escape sequences, however the formatting of the param is incorrect. Use `id=` instead of `id:` Fixes: 43efca775e73 ("hyperlinks: add support for optional id parameter") --- style.go | 2 +- terminfo/terminfo_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/style.go b/style.go index 2a92079d..98354c85 100644 --- a/style.go +++ b/style.go @@ -171,6 +171,6 @@ func (s Style) UrlId(id string) Style { bg: s.bg, attrs: s.attrs, url: s.url, - urlId: "id:" + id, + urlId: "id=" + id, } } diff --git a/terminfo/terminfo_test.go b/terminfo/terminfo_test.go index 962289ca..c159aaba 100644 --- a/terminfo/terminfo_test.go +++ b/terminfo/terminfo_test.go @@ -139,8 +139,8 @@ func TestStringParameter(t *testing.T) { if s != "\x1b]8;;https://example.org/test\x1b\\" { t.Errorf("Result string failed: %s", s) } - s = ti.TParm(ti.EnterUrl, "https://example.org/test", "id:1234") - if s != "\x1b]8;id:1234;https://example.org/test\x1b\\" { + s = ti.TParm(ti.EnterUrl, "https://example.org/test", "id=1234") + if s != "\x1b]8;id=1234;https://example.org/test\x1b\\" { t.Errorf("Result string failed: %s", s) } }