Skip to content

Export-MamlCommandHelp duplicates 'Online Version' in maml file #803

@ahpooch

Description

@ahpooch

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • 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

Metadata

Metadata

Labels

Area-MAMLIssue concerns conversion to MAML

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions