PowerShell / platyPS

Write PowerShell External Help in Markdown
MIT License
782 stars 155 forks source link

OPS12 Import-MarkdownCommandHelp doesn't handle empty Aliases H2 #691

Closed sdwheeler closed 1 month ago

sdwheeler commented 1 month ago

Prerequisites

Steps to reproduce

If the ## ALIASES section is empty the command imports the ## Description section into the Aliases property.

Expected behavior

$c = import-MarkdownCommandHelp -Path .\Microsoft.PowerShell.PlatyPS\Compare-CommandHelp.md
$c.Aliases

Actual behavior

$c.Aliases
## DESCRIPTION

`Compare-CommandHelp` is a troubleshooting tool that compares two CommandHelp objects and produces a
detailed report showing the differences. For example, you can use this to compare objects imported
from different sources, such as two different versions of Markdown files.

Error details

n/a

Environment data

OPS12 build - See the attached markdown file.

Visuals

No response

sdwheeler commented 1 month ago

Fixed in OPS13