rstudio / rstudio

RStudio is an integrated development environment (IDE) for R
https://posit.co/products/open-source/rstudio/
Other
4.59k stars 1.08k forks source link

use separate highlight rule set for chunks / Sexpr #14670

Closed kevinushey closed 1 month ago

kevinushey commented 1 month ago

Intent

Addresses https://github.com/rstudio/rstudio/issues/14667. Addresses https://github.com/rstudio/rstudio/issues/14646.

Approach

Rather than use the same highlight rules (and so, same highlighter state) for both R code chunks and \Sexpr{} code blocks, use separate highlighter sets. This is necessary as we need to track the { and} count within \Sexpr{} calls, but not within regular R code chunks.

Automated Tests

Included in PR.

QA Notes

Test via notes in associated issues.

Documentation

N/A

Checklist