interactive icon indicating copy to clipboard operation
interactive copied to clipboard

Inconsistent Syntax Highlighting for KQL in Polyglot Notebooks with and without --name in Magic Command

Open asilverman opened this issue 1 year ago • 0 comments

Describe the bug

I noticed an inconsistency in syntax highlighting when using the KQL magic command in Polyglot Notebooks, depending on the presence of the --name parameter. When --name is omitted, the syntax highlighting is normal, but when --name is included, the highlighting appears different (as seen in the screenshots below).

Steps to Reproduce:

  1. Open a KQL notebook in Polyglot Notebooks.
  2. Run the following code without the --name parameter:
    #!kql-shiftleft-uw-prod.westus
    let SampleTable = datatable(DynamicColumn: dynamic)
    [
        dynamic({"a": 1, "b": {"a": 2}})
    ];
    SampleTable
    
  3. Observe the syntax highlighting (normal behavior in the image below).

Image

  1. Run the same code with the --name parameter:
    #!kql-shiftleft-uw-prod.westus --name foo
    let SampleTable = datatable(DynamicColumn: dynamic)
    [
        dynamic({"a": 1, "b": {"a": 2}})
    ];
    SampleTable
    
  2. Observe the syntax highlighting (different behavior in the image below).

Image

Expected Behavior:
The syntax highlighting should remain consistent, regardless of the presence or absence of the --name parameter in the magic command.

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):

Image

  • OS
    • [x] Windows 11
  • Frontend
    • [x] Visual Studio Code Insiders

Visual Studio Code Extension Details

Name: Polyglot Notebooks
Id: ms-dotnettools.dotnet-interactive-vscode
Description: Polyglot Notebooks for VS Code. Use multiple languages in one notebook with full language server support for each language and share variables between them.
Version: 1.0.6070011
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-interactive-vscode

asilverman avatar Jan 23 '25 01:01 asilverman