diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2024-09-11 11:11:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-11 11:11:39 +0100 |
commit | ad30703e8e6bcf0fb87b5bc4ad1b49d040e54c77 (patch) | |
tree | d12ffffadb03aac3c93f0fd13499abccb5707160 /cli/lsp/repl.rs | |
parent | 8bdd364dd568f93097ecee41e66c74d16d75c015 (diff) |
fix(lsp): encode url parts before parsing as uri (#25509)
Diffstat (limited to 'cli/lsp/repl.rs')
-rw-r--r-- | cli/lsp/repl.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/lsp/repl.rs b/cli/lsp/repl.rs index a238a22cc..fa5809045 100644 --- a/cli/lsp/repl.rs +++ b/cli/lsp/repl.rs @@ -1,7 +1,6 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. use std::collections::HashMap; -use std::str::FromStr; use deno_ast::LineAndColumnIndex; use deno_ast::ModuleSpecifier; @@ -42,6 +41,7 @@ use super::config::LanguageWorkspaceSettings; use super::config::ObjectLiteralMethodSnippets; use super::config::TestingSettings; use super::config::WorkspaceSettings; +use super::urls::uri_parse_unencoded; use super::urls::url_to_uri; #[derive(Debug)] @@ -263,7 +263,8 @@ impl ReplLanguageServer { } fn get_document_uri(&self) -> Uri { - Uri::from_str(self.cwd_uri.join("$deno$repl.ts").unwrap().as_str()).unwrap() + uri_parse_unencoded(self.cwd_uri.join("$deno$repl.ts").unwrap().as_str()) + .unwrap() } } |