Skip to content

Comment-Based Help ".LINK" Section Duplicates Lines In Some Scenarios #24504

Open
@AHollett95

Description

Prerequisites

Steps to reproduce

I am experiencing an issue similar to #18716 where there is duplication of the LINK section, but different characters or white spaces can fix the issue.

In some scenarios on PowerShell 7.4.6 when using Get-Help [FunctionName], links are duplicated in the related links section. I've noticed that this only seems to happen if there is more than one line in the .LINK section.

Expected behavior

function Get-Something { 
  <# 
    .LINK
    https://collab.blah.com/:b:/r/sites/This%20Has%20Additional%20Stuff/
    https://lmgtfy.com
    https://BobisAwesome.com
    https://whatsonthemenutoday.com
  #>
}

Get-Help Get-Something -Full

RELATED LINKS
  https://collab.blah.com/:b:/r/sites/This%20Has%20Additional%20Stuff/
  https://lmgtfy.com
  https://BobisAwesome.com
  https://whatsonthemenutoday.com

Actual behavior

RELATED LINKS
  https://collab.blah.com/:b:/r/sites/This%20Has%20Additional%20Stuff/
  https://lmgtfy.com
  https://BobisAwesome.com
  https://whatsonthemenutoday.com
  https://collab.blah.com/:b:/r/sites/This%20Has%20Additional%20Stuff/
  https://lmgtfy.com
  https://BobisAwesome.com
  https://whatsonthemenutoday.com

We've noticed that through some testing any combination of these fix the issue: 
Any non-white special character before the https://
Added spaces between, before, after the "://"

Error details

No response

Environment data

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

Visuals

No response

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageThe issue is new and needs to be triaged by a work group.WG-Interactive-Consolethe console experienceWG-NeedsReviewNeeds a review by the labeled Working Group

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions