Skip to content

Commit

Permalink
chore: Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
vipentti committed Dec 1, 2024
1 parent 358361f commit c38bd7b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Visp.LanguageServer/LanguageServer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ let NormalizePath (str: string) =
if file.StartsWith('/') then file else "/" + file

let denormalizePath (uri: Uri) =
let full = uri.ToString()
let full = full.Replace("file://", "").Replace("%3A", ":")
if full.StartsWith("/") then
let full = uri.ToString().Replace("file://", "")
let probablyWindows = full.IndexOf("%3A") > -1
let full = full.Replace("%3A", ":")

if probablyWindows && full.StartsWith("/") then
full.Substring(1)
else
full


let ToFileUri (str: string) =
str |> NormalizePath |> (+) "file://" |> Uri

Expand Down

0 comments on commit c38bd7b

Please sign in to comment.