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.
User avatar
arjanbroeke
Posts: 44
Joined: Tue Jul 17, 2012 7:53 pm
Location: Netherlands
Contact:

Color Coding fails on nested block comments

Post by arjanbroeke » Thu Apr 05, 2018 2:07 am

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.  
  9.   #>
  10.  
  11.   <#
  12.  
  13.   #>
  14.  
  15. #>
2018-04-05_1101.png
2018-04-05_1101.png (382.1 KiB) Viewed 1094 times

User avatar
davidc
Posts: 5913
Joined: Thu Aug 18, 2011 4:56 am

Re: Color Coding fails on nested block comments

Post by davidc » Thu Apr 05, 2018 7:47 am

You cannot nest multi-line comments in PowerShell. You can however use single line comments within a multi-line comment.
David
SAPIEN Technologies, Inc.