From 20c5d3b2ef15833d6f01eefc5b2b2a89736c1538 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 20 Jan 2021 20:48:42 +0100 Subject: LanguageServer: quote URI, adjust lsp.py (for Windows) URI on windows have the colon character (':') quoted. --- pyGHDL/lsp/lsp.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'pyGHDL/lsp') diff --git a/pyGHDL/lsp/lsp.py b/pyGHDL/lsp/lsp.py index 1806db8d8..7d869d484 100644 --- a/pyGHDL/lsp/lsp.py +++ b/pyGHDL/lsp/lsp.py @@ -47,8 +47,7 @@ def path_from_uri(uri): def path_to_uri(path): # Convert path to file uri (add html like head part) if is_windows: - # Do not quote ':' (nor '/'). - return "file:///" + quote(path.replace("\\", "/"), "/:") + return "file:///" + quote(path.replace("\\", "/")) else: return "file://" + quote(path) -- cgit v1.2.3