platyPS icon indicating copy to clipboard operation
platyPS copied to clipboard

Update-MarkdownHelp does not update placeholders "{{ }}" once Parameters have been described in the Function

Open DEberhardt opened this issue 4 years ago • 2 comments

Update-MarkdownHelp does not update

Steps to reproduce

Create a function in a Module, do NOT describe a parameter. Import the module, run New-MarkdownHelp -Module The description for uncommented Parameter is - per design - replaced with double curly brackets {{...}} Describe the parameter, remove the module, import the module again Verify with Get-Help that the description is visible Run Update-MarkdownHelp to update all documentation

Expected behavior

Curly brackets are replaced with description text for the parameter

Actual behavior

Section is not replaced

Further analysis

Section is also not replaced if curly brackets are removed and .md file saved first. Using the Force does not help

Workaround

Remove .MD file and run New-Markdownhelp again

Environment data

PlatyPS version v.0.14.0

Name                           Value
----                           -----
PSVersion                      5.1.19041.610
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.610
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

and

Name                           Value
----                           -----
PSVersion                      7.2.0-preview.2
PSEdition                      Core
GitCommitId                    7.2.0-preview.2
OS                             Microsoft Windows 10.0.19042
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

DEberhardt avatar Jan 09 '21 12:01 DEberhardt

Experiencing the same behavior: Update-MarkdownHelp doesn't update existing Markdown files which have been generated by New-MarkdownHelp, even though the cmdlet itself has an updated synopsis, description, etc...

Output after running the command:

VERBOSE: Reading from '...\docs\AzureDevOps\Revoke-UserAccess.md' with encoding = Unicode (UTF-8)
VERBOSE: Start processing command Revoke-UserAccess
VERBOSE: Processing: Revoke-UserAccess
VERBOSE: ---- UPDATING Cmdlet : Revoke-UserAccess ----

VERBOSE:        Parameter Set Added: __AllParameterSets

VERBOSE:        Parameter Set Deleted:

VERBOSE:        Parameter Set Name Updated: __AllParameterSets
                Old Set:
                New Set: __AllParameterSets

VERBOSE: ---- COMPLETED UPDATING Cmdlet : Revoke-UserAccess ----


VERBOSE: Reading from '...\docs\AzureDevOps\Revoke-UserAccess.md' with encoding = Unicode (UTF-8)
VERBOSE: Not writing to ...\docs\AzureDevOps\Revoke-UserAccess.md, because content is not changing.
-a---         12/8/2021  10:48 AM           1520   Revoke-UserAccess.md

platyPS version:

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     0.14.2                platyPS                             {Get-HelpPreview, Get-MarkdownMetadata, Merge-MarkdownHelp, New-ExternalHelp…}

$PSVerionTable:

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

smholvoet avatar Dec 08 '21 10:12 smholvoet

Yup, very annoying issue. Let me know if I can test-drive any potential fixes.

ChefkeGremmen avatar Mar 12 '24 14:03 ChefkeGremmen