diff --git a/content/blog/music_theory/svg-inline.lua b/content/blog/music_theory/svg-inline.lua new file mode 100644 index 0000000..fe5aaf9 --- /dev/null +++ b/content/blog/music_theory/svg-inline.lua @@ -0,0 +1,13 @@ +function Image(el) + local src = el.src + if src:match("%.svg$") then + local alt = el.caption and pandoc.utils.stringify(el.caption) or "" + local obj = string.format( + '{{< inlinesvg "%s" "%s" >}}', + src, alt + ) + return pandoc.RawInline("html", obj) + else + return el + end +end