A small R Markdown file:
Test post to wordpress
```{r testing, eval=FALSE}
library(RWordPress)
library(knitr)
options(WordPressLogin = c(<your username> = '<your password>'),
WordPressURL = 'http://www.research.relund.dk/wp/xmlrpc.php')
knit2wp('test.Rmd', title = 'Test Publishing R markdown to WordPress with pre', categories = 'R', publish=T )
knit2wp('test.Rmd', title = 'Test Publishing R markdown to WordPress with shortcode', shortcode=c(T,T), categories = 'R', publish=T )
```
becomes these two posts. In the first post the code is not recognized by the syntax highlighter plugin. In the second the html encoded characters is shown. Is there a way to not html encode between the shortcode tags so the second post will look okay?
I decided to go with the first option and use the WP Code Highlight.js plugin which accept the and tag. This makes the code look okay.