You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Short version: I'd like to be able to use hs.styledtext.new() to create some styled text which is a hyerperlink but that function doesn't seem to respect the link attribute.
Details:
If I copy some hyperlinked text into the pastebuffer outside of Hammerspoon and then examine it, I see the link attribute in play:
<copy hyperlink into pastebuffer>
> st = hs.pasteboard.readStyledText()
> stt = st:asTable()
> i(stt)
{ "pertinax aliquando an", {
attributes = {
color = {
__luaSkinType = "NSColor",
alpha = 1.0,
blue = 0.75433194637299,
green = 0.23714117705822,
red = 0.061691254377365
},
<snip>
link = {
__luaSkinType = "NSURL",
url = "https://photos.google.com/"
},
<snip>
strokeWidth = 0.0,
underlineStyle = 1.0
},
ends = 21,
starts = 1
},
__luaSkinType = "NSAttributedString"
}
But if I try to use hs.styledtext.new() to create a hyperlink, the link attribute seems to be ignored:
> st = hs.styledtext.new("test string", { color = { __luaSkinType = "NSColor", alpha = 1.0, blue = 0.75433194637299, green = 0.23714117705822, red = 0.061691254377365 }, link = { __luaSkinType = "NSURL", url = "https://photos.google.com/" } })
> i(st:asTable())
{ "test string", {
attributes = {
color = {
__luaSkinType = "NSColor",
alpha = 1.0,
blue = 0.75433194637299,
green = 0.23714117705822,
red = 0.061691254377365
}
},
ends = 11,
starts = 1
},
__luaSkinType = "NSAttributedString"
}
Since the hs.styledtext documentation doesn't mention link being supported, I assume the above behavior is not a bug and hence this is a new feature request.
The text was updated successfully, but these errors were encountered:
Short version: I'd like to be able to use hs.styledtext.new() to create some styled text which is a hyerperlink but that function doesn't seem to respect the
link
attribute.Details:
If I copy some hyperlinked text into the pastebuffer outside of Hammerspoon and then examine it, I see the
link
attribute in play:But if I try to use
hs.styledtext.new()
to create a hyperlink, the link attribute seems to be ignored:Since the hs.styledtext documentation doesn't mention
link
being supported, I assume the above behavior is not a bug and hence this is a new feature request.The text was updated successfully, but these errors were encountered: