positron
positron copied to clipboard
Data Explorer: invalid regex throws error in console
System details:
Positron and OS details: Positron Version: 2024.08.0 (Universal) build 24
Code - OSS Version: 1.91.0 Commit: d1012cc6f36088bac24a16dcfd1b55d026b239c1 Date: 2024-08-09T04:20:57.440Z Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.5.0
Interpreter details:
R 4.4
Describe the issue:
Exposing internal errors via console after running another command
Steps to reproduce the issue:
R script:
View(data.frame(string = c("catfish", "cattails", "dogwood", "catapult")))
- Read that dataframe into Data Explorer.
- Try to apply a "does not contain 'cat'" regex
^(?!.*x).* - Note the error in the filter since it's not valid for R.
- Apply a R compliant regex for the same thing
^[^x]*$- note that it filters all of the values except dogwood. - Run any command in R console (
head(mtcars)). - Note the error in the console
Warning message:
In grepl(pattern = params$term, col, ignore.case = !params$case_sensitive) :
TRE pattern compilation error 'Invalid regexp'
Expected or desired behavior:
An invalid regex shouldn't be exposed via console.