Last active
February 13, 2018 05:16
-
-
Save daattali/33dacbfa8a2efb20e617926d762475b7 to your computer and use it in GitHub Desktop.
How to get pandoc 2+ to retain HTML tags in markdown?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## foo `bar` | |
hello | |
``` | |
x <- 5 | |
``` | |
<p align="center">test</p> | |
I can't figure out how to convert this to markdown using rmarkdown::render() without stripping the `<p>` tag around `test`. (You need to view the "raw" version of this file to see that there is a `<p>` tag, because github renders it as HTML) | |
rmarkdown::render("test.Rmd", output_format = "md_document", output_options = list(pandoc_args = c("-t", "commonmark"), md_extensions = c("+raw_html", "+raw_attribute"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment