Skip to content

Commit

Permalink
fixed parser crash
Browse files Browse the repository at this point in the history
  • Loading branch information
apxltd committed Feb 18, 2021
1 parent ba4e5db commit d62ddf6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Scripting/InedoExtension/PowerShell/PSConfigParameterInfo.cs
Expand Up @@ -22,6 +22,11 @@ public sealed class PSConfigParameterInfo
public static IEnumerable<PSConfigParameterInfo> FromDocumentationBlocks(ILookup<string, (string param, string content)> docBlocks)
{
var names = new[] { "AHCONFIGTYPE", "AHCONFIGKEY", "AHDESIREDVALUE", "AHCURRENTVALUE", "AHVALUEDRIFTED" };
var ahBlocks = docBlocks
.Where(l => names.Contains(l.Key, StringComparer.OrdinalIgnoreCase));
if (!ahBlocks.Any())
yield break;

var numParams = docBlocks
.Where(l => names.Contains(l.Key, StringComparer.OrdinalIgnoreCase))
.Max(l => l.Count());
Expand Down

0 comments on commit d62ddf6

Please sign in to comment.