c-cube / printbox

print nested boxes, lists, arrays, tables in several formats
https://c-cube.github.io/printbox/
BSD 2-Clause "Simplified" License
75 stars 9 forks source link

Fixes #10: ANSI encoded hyperlinks for printbox-text #41

Closed lukstafi closed 4 months ago

lukstafi commented 4 months ago

Propagate the link until text nodes, and then add the ANSI escape codes as specified here. Note that the codes are somewhat unusual -- example from that page: printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'.

Inner links override outer links -- this preserves as much information / optionality as possible for the user.

c-cube commented 4 months ago

Very nice, thank you!