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

More resilient pandoc self-contained mechanism #292

Merged
merged 1 commit into from Nov 15, 2017

Conversation

jcheng5
Copy link
Collaborator

@jcheng5 jcheng5 commented Nov 15, 2017

Fixes two pandoc 2.0 issues with saveWidget(selfcontained=TRUE):

  1. The [WARNING] This document format requires a nonempty <title> element message from saveWidget doesn't specify a <title> element #289
  2. The <!DOCTYPE html> showing up as a text string in the browser (though often hidden because many htmlwidgets completely fill the page)

I tested with pandoc 2.0.2 and 1.19.2.1, both on Linux. They both seem to work fine with the examples I tried. However, one difference I noticed was that JavaScript dependencies are completely data URI/base64 encoded in 1.19.2.1, but inlined as cleartext in 2.0.2. I don't know if this matters to anyone, I actually think cleartext is superior personally.

pandoc 1.19.2.1:

image

pandoc 2.0.2:

image

@jjallaire jjallaire merged commit c042cca into master Nov 15, 2017
@jjallaire
Copy link
Collaborator

Thanks!

@jjallaire
Copy link
Collaborator

@jmcphers I think it's worth checking if we need a similar fix in the RStudio version of this function (although we can't necessarily rely on htmltools there):

https://github.com/rstudio/rstudio/blob/b84eed57bf77ee795e37f50431d4908a0584b57a/src/cpp/session/modules/ModuleTools.R#L297

@jmcphers
Copy link

@jjallaire Appreciate the heads up, I've opened rstudio/rstudio#1756 to track this.

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.

None yet

3 participants