aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJeroen de Haas <jah.dehaas@avans.nl>2021-08-30 12:52:45 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2021-08-30 08:35:35 -0700
commit7d91ff28ace66fdbe49d7984b56ae097550e166c (patch)
tree442c4591db43025708c21d5ef9e879dd68bb40b3 /doc
parent5dcd4610e2301baf73f96abcd80315be45d41f3e (diff)
downloadpandoc-7d91ff28ace66fdbe49d7984b56ae097550e166c.tar.gz
Do not leak working directory in TikZ filter
Diffstat (limited to 'doc')
-rw-r--r--doc/lua-filters.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index e2a65fe1e..52e54cb5b 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -695,12 +695,12 @@ end
function RawBlock(el)
if starts_with('\\begin{tikzpicture}', el.text) then
local filetype = extension_for[FORMAT] or 'svg'
- local fname = system.get_working_directory() .. '/' ..
- pandoc.sha1(el.text) .. '.' .. filetype
+ local fbasename = pandoc.sha1(el.text) .. '.' .. filetype
+ local fname = system.get_working_directory() .. '/' .. fbasename
if not file_exists(fname) then
tikz2image(el.text, filetype, fname)
end
- return pandoc.Para({pandoc.Image({}, fname)})
+ return pandoc.Para({pandoc.Image({}, fbasename)})
else
return el
end