-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hash the URI as part of the hyperlink ID #7940
Conversation
GOSH, it's like I didn't even compile the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, but waiting to see the test changes.
It turns out that we missed part of the OSC 8 spec which indicated that _hyperlinks with the same ID but different URIs are logically distinct._ > Character cells that have the same target URI and the same nonempty id > are always underlined together on mouseover. > The same id is only used for connecting character cells whose URIs is > also the same. Character cells pointing to different URIs should never > be underlined together when hovering over. This pull request fixes that oversight by appending the (hashed) URI to the generated ID. When Terminal receives one of these links over ConPTY, it will hash the URL a second time and therefore append a second hashed ID. This is taken as an acceptable cost. Fixes #7698
OKAY I ADDED A NEW TEST GOSH |
92f2b7d
to
0008fc6
Compare
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
It turns out that we missed part of the OSC 8 spec which indicated that _hyperlinks with the same ID but different URIs are logically distinct._ > Character cells that have the same target URI and the same nonempty id > are always underlined together on mouseover. > The same id is only used for connecting character cells whose URIs is > also the same. Character cells pointing to different URIs should never > be underlined together when hovering over. This pull request fixes that oversight by appending the (hashed) URI to the generated ID. When Terminal receives one of these links over ConPTY, it will hash the URL a second time and therefore append a second hashed ID. This is taken as an acceptable cost. Fixes #7698 (cherry picked from commit df7c3cc)
🎉 Handy links: |
🎉 Handy links: |
* Run all images through ImgBot (CC-8169) * Fix potential over/underflow as noted by "TODO:" comment (CC-8081) * Fix garbling when copying multibyte text via OSC 52 (CC-7870) * UIA: throw E_FAIL for out-of-bounds text (CC-8052) * Consider the GlyphWidth when calculate the postion of matched word in URL detecting (CC-8124) * Make the link underline less obtrusive; don't use it for pattern (GH-8148) * Fully regenerate CodepointWidthDetector from Unicode 13.0 (GH-8035) * Prepare for the primary branch name to change to main (GH-7985) * Hash the URI as part of the hyperlink ID (GH-7940) * Introduce til::presorted_static_map (GH-7640) * Prevent leftover cursor fragments when scrolling in PowerShell (CC-8173) * Add support for the DECREQTPARM report (CC-7939) * Refactor VT parameter handling (CC-7799) * Add support for the "blink" graphic rendition attribute (CC-7490) * Combine the parsing & dispatch blocks for OSC actions (CC-8202) * Add support for autodetecting URLs and making hyperlinks (CC-7691) * Copy _currentHyperlinkId when copying the buffer (CC-8074) * Fix the "visual representation" optimization for hyperlinks (CC-7738) * Optimize the binary size of the XOrg color table (CC-7929) * Add support for more OSC color formats (CC-7578) Related work items: MSFT-30259074
It turns out that we missed part of the OSC 8 spec which indicated that
hyperlinks with the same ID but different URIs are logically distinct.
This pull request fixes that oversight by appending the (hashed) URI to
the generated ID.
When Terminal receives one of these links over ConPTY, it will hash the
URL a second time and therefore append a second hashed ID. This is taken
as an acceptable cost.
Fixes #7698