RMarkdown 不将 Stan 代码块呈现为代码

RMarkdown not rendering Stan code chunk as code

当我编织如下RMarkdown文档时:


title: "Reprex"
author: "Jeremy Colman"
date: "17/07/2018"
output:
  html_document: default
  pdf_document: default
  word_document: default
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```


 ```{stan, output.var='priors', eval = FALSE, tidy = FALSE}

parameters {
  real<lower = 0>  qtilde1;

}

model {
  qtilde1 ~ gamma(38.9, 0.67);

}

```

Stan 代码块呈现为普通文本,包括块头中的三个反单引号和单词 stan。我无法在这个 post 中显示,因为 Whosebug 正确但无益地告诉我 "Your post appears to contain code that is not properly formatted as code"。这总结了我的问题!

R 中的代码块已正确呈现。

你的

 ```{stan output.var='priors', eval = FALSE, tidy = FALSE}

需要左对齐,但是在 ```

之前有前导 space