I have an RMarkdown file open in RStudio Server v1.0.136. I typically compile to HTML format, so I have the YAML header set for this. However, if I try to compile to PDF instead, the Rstudio messes up the YAML and breaks the document.

Note that among other things, the R expression in the parameters has lost the leading !r which makes it work. It also re-arranges the order of the entries (inconseqential), and in one case it also broke the quoting of the R expressions I am using in my author and date field.