PowerShell / ProjectMercury

An interactive shell to work with AI-powered assistance providers
MIT License
43 stars 11 forks source link

Fix the regular expression used to match strings and numbers in a JSON text to prevent hang when rendering #141

Closed daxian-dbw closed 3 months ago

daxian-dbw commented 3 months ago

PR Summary

Fix #140

The regex for string matching in JSON text caused the hang, and it's fixed in this PR Also fixed the regex for number matching. Given that the bad regex is in the ColorCode package, I have to create the JSON language to overwrite the default JSON language from the package. I will submit a PR to ColorCode repo once we are confident the new regular expressions are correct.

image