Skip to content

Export-MamlCommandHelp isn't showing pipeline input correctly #804

@sdwheeler

Description

@sdwheeler

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

The Name parameter of Get-Command accepts pipeline input. The markdown shows this correctly.

get-help Get-Command -Parameter Name

-Name [<System.String[]>]
    Specifies an array of names. This cmdlet gets only commands that have the specified name. Enter a
    name or name pattern. Wildcard characters are permitted.

    To get commands that have the same name, use the **All** parameter. When two commands have the same
    name, by default, `Get-Command` gets the command that runs when you type the command name.

    Required?                    false
    Position?                    0
    Default value
    Accept pipeline input?       false
    Aliases                      none
    Accept wildcard characters?  true

Steps to reproduce.

$c = Import-MarkdownCommandHelp .\reference\7.5\Microsoft.PowerShell.Core\Get-Command.md
$c | Export-MamlCommandHelp -OutputFolder test -Force
show-helpPreview -Path .\test\Microsoft.PowerShell.Core\Microsoft.PowerShell.Core-Help.xml

Expected behavior

get-help Get-Command -Parameter Name

-Name [<System.String[]>]
    Specifies an array of names. This cmdlet gets only commands that have the specified name. Enter a
    name or name pattern. Wildcard characters are permitted.

    To get commands that have the same name, use the **All** parameter. When two commands have the same
    name, by default, `Get-Command` gets the command that runs when you type the command name.

    Required?                    false
    Position?                    0
    Default value
    Accept pipeline input?       true
    Aliases                      none
    Accept wildcard characters?  true

Actual behavior

get-help Get-Command -Parameter Name

-Name [<System.String[]>]
    Specifies an array of names. This cmdlet gets only commands that have the specified name. Enter a
    name or name pattern. Wildcard characters are permitted.

    To get commands that have the same name, use the **All** parameter. When two commands have the same
    name, by default, `Get-Command` gets the command that runs when you type the command name.

    Required?                    false
    Position?                    0
    Default value
    Accept pipeline input?       false
    Aliases                      none
    Accept wildcard characters?  true

Error details

Environment data

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     1.0.1                 Microsoft.PowerShell.PlatyPS        {Compare-CommandHelp, Export-MamlCommandHelp, Exp…

Version

v1.0.1

Visuals

No response

Metadata

Metadata

Labels

Area-MAMLIssue concerns conversion to MAML

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions