Skip to content

Commit

Permalink
fix: disable interpretation of backslash escapes in response body
Browse files Browse the repository at this point in the history
  • Loading branch information
NTBBloodbath committed May 27, 2021
2 parents dbb712b + 275c713 commit d5a4022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/rest-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ local function curl_cmd(opts)
if json_body then
-- Format JSON output and then add it into the buffer
-- line by line because Vim doesn't allow strings with newlines
local out = fn.system("echo '" .. line .. "' | jq .")
local out = fn.system("echo -E '" .. line .. "' | jq .")
for _, _line in ipairs(utils.split(out, '\n')) do
line_count = api.nvim_buf_line_count(res_bufnr) - 1
api.nvim_buf_set_lines(
Expand Down

0 comments on commit d5a4022

Please sign in to comment.