fix: fix non escaped bat theme (#319)

When a bat theme contained spaces it would crash the bat previewer as
described in #318.
This commit is contained in:
Alessandro Martini
2020-12-11 00:46:39 -03:00
committed by GitHub
parent 77e8125ef5
commit 62b8655f15

View File

@@ -154,7 +154,7 @@ local bat_maker = function(filename, lnum, start, finish)
end end
if theme ~= nil then if theme ~= nil then
table.insert(command, { "--theme", string.format("%s", theme) }) table.insert(command, { "--theme", string.format("%s", vim.fn.shellescape(theme)) })
end end
return flatten { return flatten {