Skip to content

Commit

Permalink
make document work regardless of linesep
Browse files Browse the repository at this point in the history
  • Loading branch information
milesziemer committed Jun 13, 2024
1 parent 2d1844f commit 80fc8fe
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package software.amazon.smithy.lsp;

import java.net.URI;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Expand Down Expand Up @@ -176,7 +177,7 @@ public DidOpen text(String text) {

public DidOpenTextDocumentParams build() {
if (text == null) {
text = IoUtils.readUtf8File(URI.create(uri).getPath());
text = IoUtils.readUtf8File(Paths.get(URI.create(uri)));
}
return new DidOpenTextDocumentParams(new TextDocumentItem(uri, languageId, version, text));
}
Expand Down

0 comments on commit 80fc8fe

Please sign in to comment.