Repository navigation
Let a plain-text clipboard get read any offered plain-text variant - #18
Merged
Merged
Conversation
yas clipboard set offers text/plain;charset=utf-8, but get asks for exactly text/plain by default, so set-then-get failed with NotFound. Get now resolves a plain-text request (text/plain with or without a charset, or UTF8_STRING) to whichever plain-text type the owner offered.
Coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #17; the diff shows only this change.
yas clipboard setoffers onlytext/plain;charset=utf-8. A plainyas clipboard getasks fortext/plain, which didn't match, so it failed with NotFound and set-then-get didn't round-trip.The fix is in
resolve_mime. A plain-text request (text/plainwith or without a charset, orUTF8_STRING) now reads whichever plain-text variant the owner offered. Other MIME types still have to match exactly.Testing
plain_text_requests_read_any_offered_plain_text_variant.clipboard set "hello rt"followed bygetreturns the text. The 0.3.0 CLI fails with NotFound.Tag
@indentto continue the conversation here.