From 9a4db0e1139f1a19ac51dda98d5165d23ddf951e Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Fri, 28 Jun 2024 20:39:51 +0200 Subject: [PATCH] fix: escaping of []{} brackets were missing --- lua/neotest-golang/convert.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/neotest-golang/convert.lua b/lua/neotest-golang/convert.lua index 185c181c..e6eb1dfa 100644 --- a/lua/neotest-golang/convert.lua +++ b/lua/neotest-golang/convert.lua @@ -8,6 +8,10 @@ function M.to_gotest_regex_pattern(test_name) local special_characters = { "(", ")", + "[", + "]", + "{", + "}", } for _, character in ipairs(special_characters) do test_name = test_name:gsub("%" .. character, "\\" .. character)