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 restricting image formats #1399

Merged
merged 7 commits into from
Jul 11, 2022
Merged

Allow restricting image formats #1399

merged 7 commits into from
Jul 11, 2022

Conversation

gaborcsardi
Copy link
Member

This is currently opt in. If you set restrict_image_formats
to TRUE, then SVG images are HTML-only and PDF images are
PDF-only. Other file types are not restricted.

We could try to make it opt out, because SVGs do not work in
LaTeX and PDFs most of the time do not work in HTML.

If it is opt in, then we don't necessarily need a NEWS item
to try this out, but if it ends up being opt out, then we
do and we also need to document it,

Closes #1398.

@gaborcsardi gaborcsardi requested a review from hadley July 11, 2022 08:12
This is currently opt in. If you set `restrict_image_formats`
to `TRUE`, then SVG images are HTML-only and PDF images are
PDF-only. Other file types are not restricted.

We could try to make it opt out, because SVGs do not work in
LaTeX and PDFs most of the time do not work in HTML.

If it is opt in, then we don't necessarily need a NEWS item
to try this out, but if it ends up being opt out, then we
do and we also need to document it,

Closes #1398.
R/options.R Outdated Show resolved Hide resolved
tests/testthat/test-markdown.R Outdated Show resolved Hide resolved
tests/testthat/test-markdown.R Outdated Show resolved Hide resolved
gaborcsardi and others added 2 commits July 11, 2022 22:23
Co-authored-by: Hadley Wickham <h.wickham@gmail.com>
@gaborcsardi gaborcsardi merged commit c597e58 into main Jul 11, 2022
@gaborcsardi gaborcsardi deleted the feature/image-formats branch July 11, 2022 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow conditional or alternative images in markdown
2 participants