ZScript-VSCode icon indicating copy to clipboard operation
ZScript-VSCode copied to clipboard

Syntax highlighting breaks after using function with string containing colon

Open MeliusCZ opened this issue 1 year ago • 4 comments

When utilizing any function and inputting a string containing a colon (":"), the syntax highlighting for the remainder of the code breaks. The syntax highlighting should remain intact for the entirety of the code after utilizing the function, irrespective of the presence of a colon in the string.

Steps to Reproduce:

  1. Use the function with a string containing a colon, like so: EventHandler.SendNetworkEvent("giveitem:BFG9000");
  2. Observe the syntax highlighting behavior in the subsequent code.

MeliusCZ avatar May 05 '24 09:05 MeliusCZ

Thanks for the issue notice. I'll fix it once I can. I've probably missed something in the strings handling.

KaptainMicila avatar May 05 '24 10:05 KaptainMicila

This will be a funny response: I can't re-create the issue. I tried copy-pasting your piece of code in a few places to see if there was some kind of edge-case issue, but I can't get the syntax highlighting to break.

KaptainMicila avatar Jul 05 '24 16:07 KaptainMicila

Thanks for checking, but it happens to me every time, here is what it looks like: Issue

MeliusCZ avatar Jul 07 '24 08:07 MeliusCZ

From the picture you've sent me it seems that the highlighting was broken way before the first double quote. So, I'll ask you:

  • May you send me the same screenshot, but with the default vscode theme?
  • Are you using any string escaping in the code (there's an issue open about this at time of writing)
  • Is it possible to receive a bigger snippet of code?

KaptainMicila avatar Jul 07 '24 13:07 KaptainMicila