Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow SVG for any document format but keep high priority in non-PDF #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
allow SVG for any document format but keep high priority in non-PDF
Right now SVG (image/svg+xml) cannot be selected as a valid format for a
diagram if the document output format is latex/context (so PDF as well).

As pandoc can convert SVG into some compatible format using `rsvg-convert`,
This allows the SVG format to be in the `preferred_mime_types` list.

The previous behavior with non-PDF output formats is kept as is (raising
the SVG format priority in the `preferred_mime_types` list).
garfvl committed Jun 19, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 389db1242a6eb6f5dcccda3427c6248411d01318
2 changes: 2 additions & 0 deletions _extensions/diagram/diagram.lua
Original file line number Diff line number Diff line change
@@ -241,6 +241,8 @@ local function format_options (name)
-- Prefer SVG for non-PDF output formats
if pdf2svg then
preferred_mime_types:insert(1, 'image/svg+xml')
else
preferred_mime_types:insert('image/svg+xml')
end
return {
name = name,