Skip to content

Commit

Permalink
fix: allow single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed May 20, 2024
1 parent e460a3b commit d04d757
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lua/neotest-golang/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,8 @@ function M.test_name_from_pos_id(pos_id)
test_name = test_name:match("::(.*)$")
-- Replace :: with /
test_name = test_name:gsub("::", "/")
-- Remove any quotes
-- Remove double quotes (single quotes are supported)
test_name = test_name:gsub('"', "")
test_name = test_name:gsub("'", "")
-- Replace any special characters with . so to avoid breaking regexp
test_name = test_name:gsub("%[", ".")
test_name = test_name:gsub("%]", ".")
Expand Down

0 comments on commit d04d757

Please sign in to comment.