Open mkoohafkan opened 6 years ago
Out of bounds error is a bug obviously. The other part is semi by design. R code begins after {r
since { }
block can contain list of arguments. So highlight remains even if block is terminated by ']' or not terminated at all - highlight includes all R code from {
to the closing triple tick.
I made a stupid typo and defined a chunk as
i.e., I accidentally ended the chunk header with a square bracket
]
instead of a curly brace}
.Code in the chunk is still highlighted correctly and the chunk has the standard grey background color etc. RTVS doesn't detect a coding error there either. When I try to run the chunk with Ctrl+Alt+C I get the error message
Which doesn't really indicate the problem.
It might be helpful to improve the error message, or do a slightly more robust check that chunk header syntax is correct.