Bit of an odd case that I just ran into. A chunk with an empty set of braces
```{}
# example code
is parsed as a plain code block by pandoc/rmarkdown
``` r
text <- c(
"```{}",
"# example code",
"```"
)
withr::with_tempfile("tf", {
writeLines(knitr::knit(text = text), tf)
rmarkdown::pandoc_convert(tf, from = "markdown", to = "html")
})
#> <pre><code># example code</code></pre>
but is flagged as invalid syntax by parse_rmd().
parsermd::parse_rmd(text)
#> Error: Failed to parse line 1, expected chunk engine
#> ```{}
#> ~~~~^
Bit of an odd case that I just ran into. A chunk with an empty set of braces
but is flagged as invalid syntax by
parse_rmd()
.