Skip to content

Powershell moniker not added when using Powershell Core #475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bravo-kernel opened this issue Oct 14, 2019 · 5 comments
Closed

Powershell moniker not added when using Powershell Core #475

bravo-kernel opened this issue Oct 14, 2019 · 5 comments

Comments

@bravo-kernel
Copy link

bravo-kernel commented Oct 14, 2019

Steps to reproduce

  1. Open Powershell Core
  2. Generate markdown for a module that has a valid example (like my snippet below)
<#
    .SYNOPSIS
    Gets the full path of the folder holding the Macrium backup files for this job.

    .EXAMPLE
    Get-MacriumReflectBackupDestination
#>

Expected behavior

Markdown example gets generated with markdown moniker powershell.

Actual behavior

Code block is generated but without the powershell moniker.

Probable cause

This might be caused by Get-Help producing different examples like shown below. The first line is produced inside "plain" Powershell, the second one inside Powershell Core.

PS C:\>Get-MacriumReflectBackupDestination
PS > Get-MacriumReflectBackupDestination

FWIW I've seen some code and comments passing by while reading up on this and I recall a checks/regex is done for the first variant only. Confirmation that this is indeed a bug would be highly appreciated.

@bravo-kernel
Copy link
Author

OH, I notice this applies to both Powershell versions as well as the markdown generated for PlatyPS.

Am I expecting something unsupported here?

@vors
Copy link
Collaborator

vors commented Oct 16, 2019

This is dupe of #294 that was here for a really long time :)
Please feel free to contribute the fix, that should be couple line change.

@bravo-kernel
Copy link
Author

bravo-kernel commented Oct 16, 2019

@vors thanks for replying, I got confused by all the issues, especially #249 as I could not see any clear conclusion/decision (even after re-reading it about 100 times).

Just to be sure: are you saying... you approve of adding powershell to the produced output?

@vors
Copy link
Collaborator

vors commented Oct 16, 2019

yes!

@bravo-kernel
Copy link
Author

Awesome. Unsure if I will be able to pull this off myself but this perhaps this green light can motivate other contributors s as well. Much appreciated 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants