Support for ansi terminal links
I'm looking for a package that can convert ansi-tagged links to html.
It is possible to create VT100 terminal hyperlinks.
const ESC = '\u001B[';
const OSC = '\u001B]';
const BEL = '\u0007';
const SEP = ';';
var test = [
OSC,
'8',
SEP,
SEP,
"url",
BEL,
"text",
OSC,
'8',
SEP,
SEP,
BEL
].join('');
console.log(test);
or
echo -e '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\'
These are correctly displayed in the terminal, and correctly represented in a file.
However, currently ansi-to-html displays them in plain text.
]8;;urltext]8;;
]8;;http://example.com\This is a link]8;;\
Could we make these type of links work? Thank you.
are there ansi escape codes which denote a URL? I had guessed the terminal application was doing pattern matching on the text, to treat links in a special fashion. In either case I think it's possible to render url's as anchor tags, and seems like a reasonable thing to do. possibly hidden behind an option.
I believe this is the emerging standard here: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
(FWIW I've added experimental support for this to GCC 10 for adding hyperlinks to our documentation to compiler warnings, so I'm interested in seeing this supported in more places)
looks like something that could be implemented without hiding it behind an option. for more reliable support, I'd guess it would still be better to additionally have the option of using pattern matching.
+1 for this, is there any movement here @rburns ?