And since this is using an inline code block, pandoc wraps the HTML in a <p>, which can have numerous unintended consequences, including changing the computed height on the input HTML (as we're seeing in https://github.com/rstudio/flexdashboard/issues/379)
# inline form
❯ pandoc -t html
`<iframe></iframe>`{=html}
^Z
<p><iframe></iframe></p>
# block form
❯ pandoc -t html
```{=html}
<iframe></iframe>
^Z
After running this through @jjallaire, it seems like the best way forward is to just not use the inline form at all since:
1. It doesn't seem like there's any real use case for wrapping the input in `<p>` (and if there is, it seems easy enough to add it to the input?)
2. This should generally yield the same result as using `options(htmltools.preserve.raw = TRUE)`, which has been around much longer
cc @cderv
Minimal reprex of the problem behind https://github.com/rstudio/flexdashboard/issues/379
This issue was introduced when we added the
htmltools.preserve.raw
in https://github.com/rstudio/htmltools/pull/191, which rmarkdown now sets to preserve HTML via pandoc's raw attributes rather than our using own hand-rolled solution.What happens is essentially:
And since this is using an inline code block, pandoc wraps the HTML in a
<p>
, which can have numerous unintended consequences, including changing the computed height on the input HTML (as we're seeing in https://github.com/rstudio/flexdashboard/issues/379)^Z