PowerShell / ProjectMercury

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

`VTSyntaxHighlighting` stuck when rendering JSON code block #140

Closed daxian-dbw closed 3 months ago

daxian-dbw commented 3 months ago

Prerequisites

Steps to reproduce

It hangs when rendering a JSON code block as follows:

{
  "$PSVersionTable": "Contains details about the version

It caused by a bad regular expression for matching JSON strings.

Expected behavior

The JSON code block should be rendered without a problem

Actual behavior

Then rendering hangs

Error details

No response

Environment data

N/A

Version

N/A

Visuals

No response