title: R Markdown citation broken by fig.align and other chunk options
body: <p>I'm writing a document in R Markdown and use a Bibtex library for my citations. They work fine when I use them in the text, but give me trouble when I try to implement them in a figure caption.</p>
  
  <p>The Bibtex reference is:</p>
  
  <pre><code>@book{TEST,
      title = {R for Data Science},
      author = {Test Person},
      year = {2018},
  }
  </code></pre>
  
  <p>How it works:</p>
  
  <pre><code>```{r carplot, echo=F, warning=F, fig.cap="This is a Test [@TEST]"}
  plot(cars)
  ```
  </code></pre>
  
  <p>Ouput:
  <a href="https://i.stack.imgur.com/xaOOo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xaOOo.png" alt="Working citation in figure caption"></a></p>
  
  <p>How it gets broken:</p>
  
  <pre><code>```{r carplot, echo=F, warning=F, fig.cap="This is a Test [@TEST]", fig.align="right"}
  plot(cars)
  ```
  </code></pre>
  
  <p>Output:
  <a href="https://i.stack.imgur.com/s4ikO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s4ikO.png" alt="enter image description here"></a></p>
  
  <p>I've tried other code chunk options like <code>out.width=".7\\textwidth"</code> and <code>out.extra = 'trim = {0 1.1cm 0 0}, clip'</code> which both cause the citation to break as well. Chunk options like <code>echo=F</code> and <code>warning=F</code> don't seem to be a problem though.</p>
  
  <p>Any Ideas how i can put figure options in the code chunk options whithout it breaking my citation? </p>