Skip to content

Commit 275c713

Browse files
committed
fix: disable interpretation of backslash escapes in response body rendering
1 parent dbb712b commit 275c713

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/rest-nvim/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ local function curl_cmd(opts)
260260
if json_body then
261261
-- Format JSON output and then add it into the buffer
262262
-- line by line because Vim doesn't allow strings with newlines
263-
local out = fn.system("echo '" .. line .. "' | jq .")
263+
local out = fn.system("echo -E '" .. line .. "' | jq .")
264264
for _, _line in ipairs(utils.split(out, '\n')) do
265265
line_count = api.nvim_buf_line_count(res_bufnr) - 1
266266
api.nvim_buf_set_lines(

0 commit comments

Comments
 (0)