Skip to content

Commit

Permalink
Fixing msorens#7
Browse files Browse the repository at this point in the history
Use the already resolved function name, instead of forcing the re-evaluation of the name via the `.ToString()` method of the `System.Management.Automation.FunctionInfo' which apparently has a bug that *doubles* the DefaultCommandPrefix of a module.
  • Loading branch information
ebekker committed Jun 15, 2017
1 parent 37619cb commit 9829165
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Convert-HelpToHtmlTree.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ function Generate-FunctionPages($moduleName, $moduleDocPath, $parentTitle, $help
$function = $_.Name
Write-Host (" {0}: {1}" -f $_.CommandType, $function)
$script:functionCount++;
$helpHash[$function] = Microsoft.PowerShell.Core\Get-Help $_ -Full -ErrorAction SilentlyContinue
$helpHash[$function] = Microsoft.PowerShell.Core\Get-Help $function -Full -ErrorAction SilentlyContinue
# convert to string array;
# must specify a wide width otherwise lines break at 80 characters!
$helpText = @($helpHash[$function] | Out-String -Stream -Width 16384)
Expand Down

0 comments on commit 9829165

Please sign in to comment.