Skip to content

Commit

Permalink
fix: quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
klen authored and NTBBloodbath committed Nov 30, 2021
1 parent 7e45caf commit 761bd07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/rest-nvim/utils/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ end
M.get_node_value = function(node, bufnr)
local start_row, start_col, _, end_col = node:range()
local line = api.nvim_buf_get_lines(bufnr, start_row, start_row + 1, false)[1]
return line and string.sub(line, start_col + 1, end_col):gsub('"', '') or nil
return line and string.sub(line, start_col + 1, end_col):gsub('^["\'](.*)["\']$', '%1') or nil
end

M.read_document_variables = function()
Expand Down

0 comments on commit 761bd07

Please sign in to comment.