Skip to content

Commit

Permalink
termcolor: add hyperlink support
Browse files Browse the repository at this point in the history
This commit adds a new type `HyperlinkSpec` and two new default methods
to the `WriteColor` trait: `set_hyperlink` and `supports_hyperlinks`.
The former is the analog to `set_color`, but for hyperlinks. The latter
is the analog to `supports_color`. By default, the former is a no-op and
the latter always returns `false`. But all ANSI-supported impls of
`WriteColor` in this trait now support it in accordance with OSC8[1].

Closes #65

[1]: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
  • Loading branch information
ltrzesniewski authored and BurntSushi committed Sep 19, 2023
1 parent 11b93e2 commit 882b662
Show file tree
Hide file tree
Showing 2 changed files with 225 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ tags
target
/Cargo.lock
/wincolor/Cargo.lock
/.idea
Loading

0 comments on commit 882b662

Please sign in to comment.