-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix(lsp): decoding percent-encoding(non-ASCII) file path correctly #22582
fix(lsp): decoding percent-encoding(non-ASCII) file path correctly #22582
Conversation
cli/lsp/documents.rs
Outdated
let format = |scheme: &str, rest: &str| -> String { | ||
format!("{}​{}", scheme, rest).replace('@', "​@") | ||
}; |
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.
BTW, I'm not clear to put in zero-width space👀
Oh, |
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.
Conflict with main: to_hover_text
has been removed in main apparently?
d7d4c43
to
eea5b99
Compare
Fix with rebase! |
…string due to display non-ASCII characters
eea5b99
to
eee88d5
Compare
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.
Thanks! Essentially this patch formats 'pretty' percent-decoded URLs for the purpose of error messages, auto-import and auto-renamed specifiers. But these URLs will normalise to the same thing.
Thanks! |
Signed-off-by: Hajime-san <41257923+Hajime-san@users.noreply.github.com>
…ly (#23200) # Summary This PR resolves about the issue. fixes #10810 And the formerly context is in the PR. #22582 Here is an expected behaviour example with this change. - 🦕.test.ts ```ts import { assertEquals } from "https://deno.land/std@0.215.0/assert/mod.ts"; Deno.test("example test", () => { assertEquals("🍋", "🦕"); }); ```
Summary
The
Url
alias of ModuleSpecifier type indeno_core
keeps local file path with percent-encoding string while it includes non-ASCII character like emoji.It causes unintentional completion, hover text, rename and diagnostic with percent-encoding string by lsp server.
This patch is an ad hoc approach for resolve this problem.
Expected behaviour
2024-02-26-01-c.mov
related issues
resolves #12065
resolves denoland/vscode_deno#517
There are test reporter and runtime problems.
#18983
There is a test reporter problem.
#10810
There are tsc problems.
#16058
microsoft/TypeScript#57539