Skip to content

Commit e0f023e

Browse files
authored
fix: env var interpolation regex expression (#53)
1 parent cd6815d commit e0f023e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/rest-nvim/utils/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ end
6565
M.replace_vars = function(str)
6666
local vars = M.read_variables()
6767

68-
for var in string.gmatch(str, "{{[%w%W]+}}") do
68+
for var in string.gmatch(str, "{{[^}]+}}") do
6969
var = var:gsub("{", ""):gsub("}", "")
7070
-- If the env variable wasn't found in the `.env` file or in the dynamic variables then search it
7171
-- in the OS environment variables

0 commit comments

Comments
 (0)