rmarkdown-cookbook
rmarkdown-cookbook copied to clipboard
How to prevent Pandoc to make some url encoded when using self contained.
self_contained: true with R Markdown, will use the --self-contained flag for Pandoc which aims at encoding all urls using Data URI so that the document embed everything and requires no net access.
This can be problematic in some case but you can prevent a specific HTML tag to be transformed by adding data-external="1" to the tag.
This is documented in Pandoc https://pandoc.org/MANUAL.html#option--self-contained
and is more needed now that Pandoc will encode all tags with a src attributes.