From 5e7f54219da47294df847dc49d7efa0348616a6e Mon Sep 17 00:00:00 2001 From: Mark Domansky <4317290+markdomansky@users.noreply.github.com> Date: Sat, 9 Jun 2018 12:21:14 -0500 Subject: [PATCH] Corrected a bug with parsing the comment block. Was failing when it tried to parse <#. Now watching for 2 pieces to a comment block section. --- WebJEA/My Project/AssemblyInfo.vb | 4 ++-- WebJEA/PSScriptParser.vb | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WebJEA/My Project/AssemblyInfo.vb b/WebJEA/My Project/AssemblyInfo.vb index 5777335..e4af972 100644 --- a/WebJEA/My Project/AssemblyInfo.vb +++ b/WebJEA/My Project/AssemblyInfo.vb @@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices ' by using the '*' as shown below: ' - - + + diff --git a/WebJEA/PSScriptParser.vb b/WebJEA/PSScriptParser.vb index 776b0e5..24abcae 100644 --- a/WebJEA/PSScriptParser.vb +++ b/WebJEA/PSScriptParser.vb @@ -148,6 +148,8 @@ Public Class PSScriptParser Section = Section.Trim 'trim leading and trailing spaces, cr,lf, etc Dim sectionarr() As String = Section.Split(vbLf.ToCharArray, 2) + If (sectionarr.Count) <> 2 Then Return 'this isn't a valid section, so skip it + Dim header As String = sectionarr(0).Trim Dim comment As String = sectionarr(1).Trim