platyPS
                                
                                
                                
                                    platyPS copied to clipboard
                            
                            
                            
                        Prompt is being removed from first line of a multiple line example
Reference #180
Steps to reproduce
Function with help example:
    .EXAMPLE
    PS> $session = New-TssSession -SecretServer https://alpha -Credential $ssCred
    PS> Disable-TssSecret -TssSession $session -Id 93
    Disables secret 93
Generated markdown picks up both lines properly now after fixes merged from #180 but the first line is having the prompt removed:
### EXAMPLE 1
'''
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
PS> Disable-TssSecret -TssSession $session -Id 93
'''
Disables secret 93
Expected behavior
Both example lines to be formatted with the PS>  prompt prefix.
### EXAMPLE 1
'''
PS> $session = New-TssSession -SecretServer https://alpha -Credential $ssCred
PS> Disable-TssSecret -TssSession $session -Id 93
'''
Disables secret 93
Actual behavior
The prompt prefix is being removed on the first line of the example
Environment data
0.14.1
I submitted issue #14656 to the PowerShell repo around Get-Help because it is removing the space on the first line after the prompt. I'm not sure if that may be what is interfering with generating the markdown properly or not.
We need to further investigate, but we believe this might be resolved with the Markdig engine
This need further investigation. This may be a problem with the interaction with the PowerShell help system (Get-Help). Need to test this for GA and decide.
Restested with Microsoft.PowerShell.PlatyPS v1. It's not importing the comment-based help properly for examples. Get-Help is also altering the propmt text in the example, but v1 is skipping the code entirely. See attached test function in zip file. test.zip