From 9988f4aa4b1ca6e8d061ab737ceda231f65c1117 Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Mon, 1 Jan 2024 23:24:46 -0500 Subject: [PATCH] fix: protect String.split from >2 parts (#50) --- lib/gen_lsp/communication/stdio.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gen_lsp/communication/stdio.ex b/lib/gen_lsp/communication/stdio.ex index 7626daf..62c1601 100644 --- a/lib/gen_lsp/communication/stdio.ex +++ b/lib/gen_lsp/communication/stdio.ex @@ -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