platyPS icon indicating copy to clipboard operation
platyPS copied to clipboard

Export-MamlCommandHelp duplicates 'Online Version' in maml file

Open ahpooch opened this issue 6 months ago • 0 comments

Prerequisites

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

Steps to reproduce

Steps to reproduce:

  • Fill in HelpUrl in cmdlet.md file HelpUri: https://github.com/ahpooch/PSMailKit/blob/main/help/PSMailKit/Send-MailMessage2.md
  • Add to ## RELATED LINKS Online Version like this [Online Version](https://github.com/ahpooch/PSMailKit/blob/main/help/PSMailKit/Send-MailMessage2.md)

Expected behavior

Only one block of maml:navigationLink with linkText 'Online Version' should be generated.

Actual behavior

Export-MamlCommandHelp will duplicate blocks in resulted maml file like this

<command:relatedLinks>
      <maml:navigationLink>
        <maml:linkText>Online Version</maml:linkText>
        <command:uri>https://github.com/ahpooch/PSMailKit/blob/main/help/PSMailKit/Send-MailMessage2.md</command:uri>
      </maml:navigationLink>
      <maml:navigationLink>
        <maml:linkText>Online Version</maml:linkText>
        <command:uri>https://github.com/ahpooch/PSMailKit/blob/main/help/PSMailKit/Send-MailMessage2.md</command:uri>
      </maml:navigationLink>
    </command:relatedLinks>

Error details


Environment data

Name                           Value
----                           -----
PSVersion                      7.5.2
PSEdition                      Core
GitCommitId                    7.5.2
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

1.0.1

Visuals

No response

ahpooch avatar Aug 16 '25 23:08 ahpooch