We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c17a257 commit c227734Copy full SHA for c227734
src/resources/extensions/quarto/placeholder/placeholder.lua
@@ -25,7 +25,15 @@ return {
25
if output_format == "svg" then
26
result = svg64
27
else
28
- local mt, contents = pandoc.mediabag.fetch("https://svg2png.deno.dev/" .. svg64)
+ local pcallresult, mt, contents = pcall(function()
29
+ local mt, contents = pandoc.mediabag.fetch("https://svg2png.deno.dev/" .. svg64)
30
+ return mt, contents
31
+ end)
32
+ if not pcallresult then
33
+ error("Error rendering placeholder")
34
+ error(contents)
35
+ return pandoc.Str("Error rendering placeholder")
36
+ end
37
if mt ~= "image/png" then
38
error("Expected image/png but got " .. mt)
39
error(contents)
0 commit comments