python-tabulate icon indicating copy to clipboard operation
python-tabulate copied to clipboard

Escape sequences in OSC8 "link text" don't get detected

Open Orochimarufan opened this issue 1 year ago • 0 comments

Because of how tabulate deals with OSC8 (hyperlink) sequences, it can't deal with any escape sequences in what it considers the "link text". However, that concept doesn't really exist and neither is a link required to end in an empty OSC8;;ST but is also allowed to directly lead into another link. See https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#a-note-on-openingclosing-hyperlinks

I think it should just remove any OSC8;*;*ST sequences individually. This should also simplify the code a bit since no captures are needed for the text anymore.

For now, one has to work around this by always placing color escape sequences around the OSC8 sequence instead of the other way around. Partially colored links are impossible (unless splitting up the OSC8 sequence into pieces with the same URL and id)

Orochimarufan avatar Jun 14 '23 13:06 Orochimarufan