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.
2 parents 67fb3e4 + 7089280 commit 92fa8e9Copy full SHA for 92fa8e9
lua/feed/pandoc/gfm.lua
@@ -24,6 +24,13 @@ function Writer(doc, opts)
24
Link = function(elem)
25
ref_counter = ref_counter + 1
26
refs[ref_counter] = elem.target
27
+
28
+ -- Checks if extension is an image and treats it as such if it is
29
+ local extension = elem.target:match("^.+%.(.+)$")
30
+ if extension == "jpg" or extension == "jpeg" or extension == "png" or extension == "webm" then
31
+ return pandoc.RawInline("markdown", (""):format(ref_counter, elem.target)) -- added for image rendering
32
+ end
33
34
local text = pandoc.utils.stringify(elem.content)
35
return pandoc.RawInline("markdown", "[" .. text .. "][^" .. ref_counter .. "]")
36
end,
0 commit comments