PowerShell / platyPS

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

OPS12 Update-MarkdownCommandHelp overwrites AcceptedValues #694

Closed sdwheeler closed 1 month ago

sdwheeler commented 1 month ago

Prerequisites

Steps to reproduce

Steps

  1. Convert the v1 markdown for the CimCmdlets module to v2
  2. Update the v2 markdown for the CimCmdlets module
  3. Compare New-CimSession.md to New-CimSession.md.bak

Expected behavior

# Convert v1 cmdlets to v2
$mdfiles = Measure-PlatyPSMarkdown -Path .\v1\CimCmdlets\*.md
$mdfiles | Where-Object Filetype -match 'CommandHelp' |
    Import-MarkdownCommandHelp -Path {$_.FilePath} |
    Export-MarkdownCommandHelp -OutputFolder .

# Update v2 cmdlets
$mdfiles = Measure-PlatyPSMarkdown -Path .\v2\CimCmdlets\*.md
$mdfiles | Where-Object Filetype -match 'CommandHelp' |
    Update-MarkdownCommandHelp -Path {$_.FilePath}

# Compare New-CimSession.md to New-CimSession.md.bak
# AcceptedValues for the -Authentication parameter should be the same

Actual behavior

# Compare New-CimSession.md to New-CimSession.md.bak

***** .\V2\CIMCMDLETS\New-CimSession.md
  160:  DontShow: false
  161:  AcceptedValues: []
  162:  HelpMessage: ''
***** .\V2\CIMCMDLETS\NEW-CIMSESSION.MD.BAK
  164:  DontShow: false
  165:  AcceptedValues:
  166:  - Default
  167:  - Digest
  168:  - Negotiate
  169:  - Basic
  170:  - Kerberos
  171:  - NtlmDomain
  172:  - CredSsp
  173:  HelpMessage: ''
*****

Error details

n/a

Environment data

OPS12 build

Visuals

No response

sdwheeler commented 1 month ago

Fixed in OPS13