mirror of https://github.com/gdamore/tcell.git
hyperlinks: fix id escape format
Commit43efca775e
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:
parent
3aa9ffce5d
commit
ede1dd5ee6
2
style.go
2
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,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue