Page 1 of 1

Color Coding fails on nested block comments

Posted: Thu Apr 05, 2018 2:07 am
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.  
  9.   #>
  10.  
  11.   <#
  12.  
  13.   #>
  14.  
  15. #>
2018-04-05_1101.png
2018-04-05_1101.png (382.1 KiB) Viewed 1358 times

Re: Color Coding fails on nested block comments

Posted: Thu Apr 05, 2018 7:47 am
by davidc
You cannot nest multi-line comments in PowerShell. You can however use single line comments within a multi-line comment.