Hi Nigel-san,
I wrote a simple example of lua filter as following (to use, save as img2svg.lua).
```
function Para(e)
for k,v in pairs(e.content) do
if v.tag == "Image" then
if string.match(v.src, "svg$") then
return(pandoc.Para(pandoc.RawInline("html", '<object data="' .. v.src .. '"></object>')))
end
end
end
end
```
If you input following markdown file of input.md,
```
![](plantuml-images/9d8236ccdf925ce21eb481c9b4f6da4e7cb52ae1.svg)
```
and then convert by `pandoc -f markdown input.md -t html output.html --lua-filter img2svg.lua`. Then you can get
```
<p><object data="plantuml-images/9d8236ccdf925ce21eb481c9b4f6da4e7cb52ae1.svg"></object></p>
```
as an output of output.html.(in your example, file name is different but I think it is typo.)
niszet
2019年6月27日木曜日 6時31分17秒 UTC+9 Nigel Magnay:
Hi -
This has been created as an issue before, but sadly the gist is no longer available.
I use the plantuml filter to render diagrams to svg. This works, but the hyperlinks in the svg are inoperable because the SVG is included as
<p><img src="plantuml-images/9d8236ccdf925ce21eb481c9b4f6da4e7cb52ae1.svg" /></p>
When it needs to be something like
<p><object data="plantuml-images/d3750ee9e6613d2f461ba5905d7909460bd02f25.svg"></object></p>
What's my easiest route to fixing this (and/or is there an example that's close I could modify) ?
TIA,
Nigel