PowerShell / platyPS

Write PowerShell External Help in Markdown
MIT License
762 stars 148 forks source link

Update-MarkdownHelp should preserve original formatting #292

Open akromm-zz opened 7 years ago

akromm-zz commented 7 years ago

Some documentation improvements were reverted by platyPS in PR: https://github.com/Azure/azure-powershell/pull/4110

Is it possible to have these improvements incorporated into PlayPS?

vors commented 7 years ago

The problem is in the module page update scenario.

BernieWhite commented 6 years ago

@akromm To clarify, you are expecting customisation of CommonParameters parameter description to be persisted and not replaced after calling Update-Markdownhelp. Is this correct?

akromm-zz commented 6 years ago

specifically these lines and associated comments: https://github.com/Azure/azure-powershell/pull/4110/files#diff-4582852f4910d3e13317d17da3c05028L11 https://github.com/Azure/azure-powershell/pull/4110/files#diff-20ae1ad2bf261311458a2e12a49094e9L305

Links in descriptions are not handled properly.

sdwheeler commented 2 years ago

There are 2 issues here:

  1. Update-Markdown help get the current help text from Get-Help (which gets it from MAML). The conversion to MAML remove hyperlinks and some other formatting that we want to preserve in the markdown source being updated.
  2. Update-Markdown is hard-coded to rewrite the CommonParmaters block, overwriting any changes made. The changes made in the linked example were to fix the markdown syntax for the hyperlink. This markdown error has been fixed in the latest builds.