Do not leak working directory in TikZ filter
This commit is contained in:
parent
5dcd4610e2
commit
7d91ff28ac
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue