Description
I've been working on a parser for RMarkdown documents using Boost's Spirit X3 library. I'm currently using the Rmds available within this repo as a test set to make sure my code is working correctly.
In running my parser I've come across some potential typos and inconsistencies in syntax in the example documents and I wanted to clarify.
Mismatched backticks
Chunk begins with 3 backticks and ends with 4, it seems like knitr is not checking for balance between the backticks as long as there is >= 3. Oddly, for the document below RStudio gives me an unexpected token error via the linter but I don't see a similar error when creating my own test documents.
Chunks missing closing backticks
There are a couple of examples where there are two sequential chunks where the first is missing its closing backticks, but it is immediately followed by the start of a new chunk. The documents compile correctly but this seems wrong to me.
Chunks with engine and name separated by a comma
There are several documents where the chunk has a format that looks like
```{engine, name, opt=val}
my understanding is that the prefered format should be
```{engine name, opt=val}
is the former syntax allowable?