{"action":"created","issue":{"url":"https://api.github.com/repos/rstudio/rmarkdown/issues/516","labels_url":"https://api.github.com/repos/rstudio/rmarkdown/issues/516/labels{/name}","comments_url":"https://api.github.com/repos/rstudio/rmarkdown/issues/516/comments","events_url":"https://api.github.com/repos/rstudio/rmarkdown/issues/516/events","html_url":"https://github.com/rstudio/rmarkdown/issues/516","id":107376852,"number":516,"title":"rendering to md_document results in error if code generates HTML","user":{"login":"dtenenba","id":2286826,"avatar_url":"https://avatars.githubusercontent.com/u/2286826?v=3","gravatar_id":"","url":"https://api.github.com/users/dtenenba","html_url":"https://github.com/dtenenba","followers_url":"https://api.github.com/users/dtenenba/followers","following_url":"https://api.github.com/users/dtenenba/following{/other_user}","gists_url":"https://api.github.com/users/dtenenba/gists{/gist_id}","starred_url":"https://api.github.com/users/dtenenba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtenenba/subscriptions","organizations_url":"https://api.github.com/users/dtenenba/orgs","repos_url":"https://api.github.com/users/dtenenba/repos","events_url":"https://api.github.com/users/dtenenba/events{/privacy}","received_events_url":"https://api.github.com/users/dtenenba/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-20T06:59:14Z","updated_at":"2015-09-22T15:13:09Z","closed_at":null,"body":"Hi,\r\n\r\nI have a document `test.Rmd` like this:\r\n\r\n```\r\n---\r\noutput:\r\n   md_document\r\n---\r\n\r\n# test\r\n\r\n```{r}\r\nlibrary(DT)\r\ndatatable(cars)\r\n    ```\r\n```\r\n\r\n(just pretend that last line is in the first column; i couldn't figure out how to escape the backticks)\r\n\r\nWhen I render it with:\r\n\r\n```\r\nrender(\"test.Rmd\")\r\n```\r\n\r\nI get\r\n\r\n```\r\nError: Functions that produce HTML output found in document targeting markdown_strict output.\r\nPlease change the output type of this document to HTML.\r\n```\r\n\r\nMaybe this is a feature, however, isn't HTML valid in markdown? In my particular use case, I am later going to convert the resulting markdown file to HTML using my own tools, but I really need markdown as the output of `rmarkdown::render()`. It would be great if there were a way to override this error and have rmarkdown go ahead and write the html to the output document.\r\n\r\n@vjcitn\r\n\r\n@vobencha\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rstudio/rmarkdown/issues/comments/142319774","html_url":"https://github.com/rstudio/rmarkdown/issues/516#issuecomment-142319774","issue_url":"https://api.github.com/repos/rstudio/rmarkdown/issues/516","id":142319774,"user":{"login":"dtenenba","id":2286826,"avatar_url":"https://avatars.githubusercontent.com/u/2286826?v=3","gravatar_id":"","url":"https://api.github.com/users/dtenenba","html_url":"https://github.com/dtenenba","followers_url":"https://api.github.com/users/dtenenba/followers","following_url":"https://api.github.com/users/dtenenba/following{/other_user}","gists_url":"https://api.github.com/users/dtenenba/gists{/gist_id}","starred_url":"https://api.github.com/users/dtenenba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtenenba/subscriptions","organizations_url":"https://api.github.com/users/dtenenba/orgs","repos_url":"https://api.github.com/users/dtenenba/repos","events_url":"https://api.github.com/users/dtenenba/events{/privacy}","received_events_url":"https://api.github.com/users/dtenenba/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T15:13:08Z","updated_at":"2015-09-22T15:13:08Z","body":"OK, I tried that but I was hoping the resulting md document would contain the required script and css tags. \r\n\r\nI don't understand why these \"obviously can't\" be added to the document for markdown. HTML is valid markdown and in my case the document will eventually be converted to HTML.\r\n\r\nCan the behavior be modified so that if allow_html_dependencies is TRUE, then all relevant html is copied to the output document?"}}