We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5a4022 commit da30eefCopy full SHA for da30eef
lua/rest-nvim/init.lua
@@ -260,7 +260,7 @@ local function curl_cmd(opts)
260
if json_body then
261
-- Format JSON output and then add it into the buffer
262
-- line by line because Vim doesn't allow strings with newlines
263
- local out = fn.system("echo -E '" .. line .. "' | jq .")
+ local out = fn.system("echo -E '" .. string.gsub(line, "[']", "\\%1") .. "' | jq .")
264
for _, _line in ipairs(utils.split(out, '\n')) do
265
line_count = api.nvim_buf_line_count(res_bufnr) - 1
266
api.nvim_buf_set_lines(
0 commit comments