Skip to content

Commit

Permalink
fix: protect String.split from >2 parts (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
fhunleth committed Jan 2, 2024
1 parent 319eb9d commit 9988f4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/gen_lsp/communication/stdio.ex
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ defmodule GenLSP.Communication.Stdio do
read_header(headers)

line ->
[k, v] = String.split(line, ":")
[k, v] = String.split(line, ":", parts: 2)
read_header(Map.put(headers, String.trim(k), String.trim(v)))
end
end
Expand Down

0 comments on commit 9988f4a

Please sign in to comment.