Files
compiler-explorer/static
narpfel ccd62cfc61 Parse terminal hyperlinks in command output (#7318)
Some compilers (such as `gcc` and `rustc`) support emitting hyperlinks
to the documentation for error messages and/or warnings. This PR adds a
parser for the respective `OSC 8` ANSI escape sequence (see
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda) and
makes them clickable in the output window.

For example: https://godbolt.org/z/o1v7WzPc6

For GCC, this would make `-Wreturn-type` a clickable link to
https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Warning-Options.html#index-Wno-return-type.

For Rust, this would make `E0425` a clickable link to
https://doc.rust-lang.org/error_codes/E0425.html.

Note that this also applies to execution output. A malicious program
could (when executed) produce output that contains clickable links to
anything.

Related feature requests:
* #5284 for `rustc` (`-Z terminal-urls=yes`)
* #7310 for `gcc` (`-fdiagnostics-urls=always`)
2025-01-29 10:46:17 -06:00
..
2025-01-29 10:33:22 -06:00
2024-10-25 12:19:04 +03:00
2023-08-15 22:16:36 -05:00
2024-11-08 18:38:41 +01:00
2024-10-25 12:19:04 +03:00
2024-10-25 12:19:04 +03:00
2024-10-25 12:19:04 +03:00
2024-10-25 12:19:04 +03:00
2024-10-25 12:19:04 +03:00
2024-01-15 18:31:46 -06:00
2024-04-09 20:20:18 -05:00
2024-10-25 12:19:04 +03:00
2024-10-25 12:19:04 +03:00
2024-10-25 12:19:04 +03:00