posit-dev / positron

Positron, a next-generation data science IDE
https://positron.posit.co
Other
2.82k stars 90 forks source link

Syntax Highlighting of Numbers Only Applies for Certain Numbers #5398

Open emstruong opened 4 days ago

emstruong commented 4 days ago

System details: Ubuntu 22.04

Positron and OS details:

Positron Version: 2024.11.0 build 140 Code - OSS Version: 1.93.0 Commit: e0d844b031f95acbf89f234a2cce2af9b6721f6c Date: 2024-10-31T14:13:53.873Z Electron: 30.4.0 Chromium: 124.0.6367.243 Node.js: 20.15.1 V8: 12.4.254.20-electron.0 OS: Linux x64 6.8.0-48-generic

Interpreter details:

R 4.4.1

Describe the issue:

probs <- c(0.025, .975)

0.025 is correctly highlighted, but not .975. However, 0.975 will be highlighted.

Image

Although this seems to be some general issue that isn't specific to Positron, it is different from how RStudio behaves. And the way RStudio behaves is good.

Steps to reproduce the issue:

  1. Open R script
  2. Type 0.025, then type .975

Expected or desired behavior:

All numbers to be highlighted

Were there any error messages in the UI, Output panel, or Developer Tools console?

I don't think so

isabelizimm commented 3 days ago

I am able to reproduce this on MacOSX with 2024.11.0 (Universal) build 140. Thank you so much for the report!