Skip to content

Commit 9988f4a

Browse files
authored
fix: protect String.split from >2 parts (#50)
1 parent 319eb9d commit 9988f4a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/gen_lsp/communication/stdio.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ defmodule GenLSP.Communication.Stdio do
7474
read_header(headers)
7575

7676
line ->
77-
[k, v] = String.split(line, ":")
77+
[k, v] = String.split(line, ":", parts: 2)
7878
read_header(Map.put(headers, String.trim(k), String.trim(v)))
7979
end
8080
end

0 commit comments

Comments
 (0)