Skip to content

Powershell moniker not added when using Powershell Core #475

Closed
@bravo-kernel

Description

@bravo-kernel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions