Skip to content

Commit 5e7cc25

Browse files
bulkanBulkan Evcimen
andauthored
feat: remove $dotenv tags from variables (#546)
This is essentially the same change as in this commit 9800b59 To allow variable definition like; @token={{$dotenv TOKEN}} Co-authored-by: Bulkan Evcimen <[email protected]>
1 parent 2ded89d commit 5e7cc25

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lua/rest-nvim/parser/init.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ end
4747
---@return string
4848
---@return integer
4949
local function expand_variables(src, context)
50+
-- remove $dotenv tags, which are used by the vscode rest client for cross compatibility
51+
src = src:gsub("%$dotenv ", ""):gsub("%$DOTENV ", "")
5052
return src:gsub("{{(.-)}}", function(name)
5153
name = vim.trim(name)
5254
local res = context:resolve(name)

0 commit comments

Comments
 (0)