PowerShell / PowerShell/platyPS
Links should throw warning/error on invalid character
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 871
- Forks
- 166
- Avg merge
- 21h 17m
- Merged PRs (30d)
- 1
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Steps to reproduce
Imagine the following function:
Function Get-Test {
<#
.SYNOPSIS
Outputs a greeting message.
.DESCRIPTION
This function outputs a greeting message.
.PARAMETER Name
The name of the person to greet.
.EXAMPLE
Get-Test -Name "World"
.NOTES
Additional information about the function
.LINK
- https://example.com/documentation
#>
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string]$Name
)
Write-Output "Hello, $Name! This is a test function."
}
Creating a CommandHelp object using New-CommandHelp is allowed. The export command also successfully exports the result. Trying to import the file, throws an error: No metadata found in Get-Test.md
The reason is because how the HelpUri is added to the metadata:
---
document type: cmdlet
external help file: Get-Test-Help.xml
HelpUri: >-
https://example.com/documentation
-
Locale: en-US
Module Name: ''
ms.date: 07/14/2025
PlatyPS schema version: 2024-05-01
title: Get-Test
---
Expected behavior
Able to import the command help after generation.
Actual behavior
An error occurs.
Error details
Environment data
Name Value
---- -----
PSVersion 7.5.2
PSEdition Core
GitCommitId 7.5.2
OS Microsoft Windows 10.0.26100
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.0-preview5
Visuals
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with New-CommandHelp using the Get-Test example, then trace how the .LINK value becomes HelpUri in the generated Get-Test.md and how import reads its metadata. Done means the generated help can be imported successfully and invalid link characters produce an appropriate warning or error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, powershell
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100