Skip to content
Discussion options

You must be logged in to vote

Workaround: use the original diagram.lua filter and run the below filter after the Quarto filters:

function Image (img)
  if img.src:match '%.svg$' then
    local mime_type, contents = pandoc.mediabag.lookup(img.src)
    if mime_type == 'image/svg+xml' and contents then
      return pandoc.RawInline('html', contents:gsub('^.*(%<svg%f[%s])', '%1'))
    end
  end
end

The time at which quarto filters are run can be controlled by using the special quarto filter:

filters:
  - diagram.lua
  - quarto
  - inline-svg.lua

(Untested, so might need some tweeking.)

Replies: 1 comment 14 replies

Comment options

You must be logged in to vote
14 replies
@mcanouil
Comment options

@netw0rkf10w
Comment options

@mcanouil
Comment options

@tarleb
Comment options

tarleb Apr 24, 2023
Collaborator

Answer selected by mcanouil
@mcanouil
Comment options

@mcanouil
Comment options

@netw0rkf10w
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
3 participants