Skip to content

Commit 8499a2e

Browse files
committed
Get the synopsis more correctly from the help object. Fix #328
1 parent de93341 commit 8499a2e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/platyPS/platyPS.psm1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2680,7 +2680,13 @@ function ConvertPsObjectsToMamlModel
26802680
}
26812681
else
26822682
{
2683-
$MamlCommandObject.Synopsis = New-Object -TypeName Markdown.MAML.Model.Markdown.SectionBody ($Help.Synopsis.Trim())
2683+
$MamlCommandObject.Synopsis = New-Object -TypeName Markdown.MAML.Model.Markdown.SectionBody (
2684+
# $Help.Synopsis only contains the first paragraph
2685+
# https://github.com/PowerShell/platyPS/issues/328
2686+
$Help.details.description |
2687+
DescriptionToPara |
2688+
AddLineBreaksForParagraphs
2689+
)
26842690
}
26852691

26862692
#Get Description

0 commit comments

Comments
 (0)