Color Coding fails on nested block comments

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
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.
This topic is 6 years and 1 week old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
arjanbroeke
Posts: 44
Last visit: Wed Apr 11, 2018 6:50 am

Color Coding fails on nested block comments

Post by arjanbroeke »

Product, version and build: PS Studio 2018 (5.5.150)
32 or 64 bit version of product: 64-bit
Operating system: Windows 10
32 or 64 bit OS: 64-bit

I've multiple block comments in a nested situation. but the color coding will fail and will stop at the wrong end marker #>

Simply said, the comments tags are nested as follows (also see the screenprint)
  1. <#
  2.   #
  3.   #
  4.   <#
  5.   #>
  6.   <#
  7.   #>
  8. #>
2018-04-05_1101.png
2018-04-05_1101.png (382.1 KiB) Viewed 1854 times
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Color Coding fails on nested block comments

Post by davidc »

You cannot nest multi-line comments in PowerShell. You can however use single line comments within a multi-line comment.
David
SAPIEN Technologies, Inc.
This topic is 6 years and 1 week old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.