diff --git a/src/MarkdownReader/CommandHelpMarkdownReader.cs b/src/MarkdownReader/CommandHelpMarkdownReader.cs index 5d85e244..4233c493 100644 --- a/src/MarkdownReader/CommandHelpMarkdownReader.cs +++ b/src/MarkdownReader/CommandHelpMarkdownReader.cs @@ -962,7 +962,7 @@ internal static List GetInputOutput(ParsedMarkdownContent md) { if (md.GetCurrent() is HeadingBlock inputOutputHeader) { - string inputType = inputOutputHeader?.Inline?.FirstChild?.ToString() ?? string.Empty; + string inputType = string.Join("", inputOutputHeader.Inline ?? []); md.Take(); if (md.GetCurrent() is ParagraphBlock pBlock) { diff --git a/test/Pester/ImportMarkdownCommandHelp.Tests.ps1 b/test/Pester/ImportMarkdownCommandHelp.Tests.ps1 index 070404a0..6cc161de 100644 --- a/test/Pester/ImportMarkdownCommandHelp.Tests.ps1 +++ b/test/Pester/ImportMarkdownCommandHelp.Tests.ps1 @@ -121,12 +121,19 @@ Describe 'Import-MarkdownCommandHelp Tests' { BeforeAll { $ch1 = Import-MarkdownCommandHelp "$PSScriptRoot/assets/Compare-CommandHelp.md" $ch2 = Import-MarkdownCommandHelp "$PSScriptRoot/assets/Get-ChildItem.md" + $ch3 = Import-MarkdownCommandHelp "$PSScriptRoot/assets/Remove-SqlSensitivityClassification.md" } It "Should have the proper input content" { $ch1.Inputs.Count | Should -Be 1 $ch1.Inputs[0].TypeName | Should -BeExactly "System.Management.Automation.HiThere" $ch1.Inputs[0].Description | Should -Be "" + + $ch3.Inputs.Count | Should -Be 2 + $ch3.Inputs[0].TypeName | Should -BeExactly "System.String[]" + $ch3.Inputs[0].Description | Should -Be "" + $ch3.Inputs[1].TypeName | Should -BeExactly "Microsoft.SqlServer.Management.Smo.Database" + $ch3.Inputs[1].Description | Should -Be "" } It "Should have the proper output content" {