hyperlinks: fix id escape format

Commit 43efca775e added support for url IDs within OSC8 escape
sequences, however the formatting of the param is incorrect.

Use `id=` instead of `id:`

Fixes: 43efca775e ("hyperlinks: add support for optional id parameter")
This commit is contained in:
Tim Culverhouse 2022-10-17 08:30:19 -05:00 committed by Garrett D'Amore
parent 3aa9ffce5d
commit ede1dd5ee6
2 changed files with 3 additions and 3 deletions

View File

@ -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,
}
}

View File

@ -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)
}
}