Closed houshuang closed 11 years ago
nice! thanks again!
@houshuang Hello, I think your commit has influenced Ruby and all other languages whose name starts with r. Why not make your regex more accurate? e.g. r|\{r(,\s.+)?\}
@houshuang 👍 Thanks! One thing I noticed is that knitr support is not there for python code chunks.
E.g typing:
```{python echo=TRUE} print('hello') ```
would neither support knitr chunk option highlighting, neither would the python code be highlighted.
The Python code only gets highlighted when curly brackets are left out but then you cannot really use it for creating documents with code output.
This is still giving me some issues. I'm writing a .Rmd
file that has such chunks in it, but the syntax highlighting can't seem to tell that the chunk has ended: after the first chunk in a document, the rest of the document continues to be highlighted as if it were still in the code chunk.
(This screen shot isn't using the Monokai Extended colour scheme, but that gives exactly the same result).
I would be happy even to just disable highlighting for all code chunks to be honest — anything to get normal markdown highlighting back for the rest of the document! (Really it's worse than just highlighting: Sublime Text's "Goto symbol" command doesn't work to navigate around sections after the start of the code chunk anymore, and e.g. selecting some text and typing *
no longer surrounds the selected text with asterisks but instead simply replaces it with a *
, as you would expect in plain text mode).
This adds support for Knitr (literate coding in R) code blocks, example: