Skip to content

More resilient pandoc self-contained mechanism - #292

Merged
jjallaire merged 1 commit into
masterfrom
joe/bugfix/missing-title
Nov 15, 2017
Merged

jjallaire merged 1 commit into
masterfrom
joe/bugfix/missing-title

Conversation

@jcheng5

@jcheng5 jcheng5 commented Nov 15, 2017 •

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Collaborator

Thanks!

@jjallaire

Copy link
Copy Markdown
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
Copy Markdown

@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.

3 participants