platyPS icon indicating copy to clipboard operation
platyPS copied to clipboard

Error handling links to other commands

Open rkeithhill opened this issue 9 years ago • 5 comments

These are really "see also" links in the sense that there isn't a link per se, just a reference to related commands. For instance, look at the bottom of full help on Get-Process. You'll see "Stop-Process" but it isn't a link with Get-Help displaying the topic.

Steps to reproduce

Create comment-based help with something like this for .LINK:

.LINK
    New-PlasterManifest
    Test-PlasterManifest

Expected behavior

New-MarkdownHelp would not fail.

Actual behavior

I get this error:

At C:\Users\Keith\Documents\WindowsPowerShell\Modules\platyPS\0.7.2\platyPS.psm1:1221 char:17
 +     $markdown | ForEach-Object {
 +                 ~~~~~~~~~~~~~~~~ [<<==>>] Exception: Exception calling "NodeModelToMamlModel" with "1" argument(s): "143:618 '[New-PlasterManifest
Test-PlasterManifest]()
' Expect hyperlink, but got [New-PlasterManifest Test-PlasterManifest]()" --> 143:618 '[New-PlasterManifest
Test-PlasterManifest]()
' Expect hyperlink, but got [New-PlasterManifest Test-PlasterManifest]()

I believe it is because it created this markdown for my links above:

## RELATED LINKS

[New-PlasterManifest
Test-PlasterManifest]()

Environment data

v0.7.2

rkeithhill avatar Oct 28 '16 04:10 rkeithhill

Related to #250

BernieWhite avatar Dec 14 '17 02:12 BernieWhite

Related to #283

BernieWhite avatar Dec 14 '17 02:12 BernieWhite

Related to #138

BernieWhite avatar Dec 14 '17 02:12 BernieWhite

@vors another hot topic to look at.

BernieWhite avatar Dec 14 '17 02:12 BernieWhite

Related to #261

BernieWhite avatar Dec 14 '17 02:12 BernieWhite

This is by design. The LINKS section expects links.

sdwheeler avatar May 31 '24 15:05 sdwheeler