Product, version and build: SAPIEN PowerShell Studio 2019 Version 5.6.165
32 or 64 bit version of product: 64-bit
Operating system: Windows 10 Pro 1903
32 or 64 bit OS: 64-bit
I'm modifying some code to have a SQL query within the Invoke-Command block, and once I've done that, colouring of code after that seems to think it's still inside the string. Also, if I hover my mouse over the mis-coloured text, it tells me it's System.String, rather than cmdlet, parameter, etc. See attached screenshot for example; you can see the properly coloured code before it, and then after the here-string, it's all orange strings:
If I move the here-string to outside the Invoke-Command block, it handles it properly. Also, still within the Invoke-Command block, it suddenly starts working properly again:
Code colouring not working properly after here-string in Invoke-Command
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Code colouring not working properly after here-string in Invoke-Command
....aaaaand in typical fashion, once I posted this and went back to my code, as soon as I started typing to finish the line after the here-string, the colouring immediately started working again. So not sure if that initial behaviour is a bug, or just that I hadn't finished the cmdlet? I can't seem to reproduce it again, either with or without that final variable on the -Query parameter. This can possibly just be closed then? Not sure how you want to handle it.
Re: Code colouring not working properly after here-string in Invoke-Command
It seems the tokenizer might have hiccupped while editing. When you modified the line near the end of the here string, it corrected the issue by finding the actual end of the here string.
We will keep an eye out.
We will keep an eye out.
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.