Allow front matter metadata to have list of Aliases #730
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary
This pull request enhances the functionality of
Import-MarkdownCommandHelp
to support reading metadata aliases from both list and string formats in Markdown files. It also includes corresponding tests to validate this new functionality.Enhancements to metadata parsing:
src/MarkdownReader/CommandHelpMarkdownReader.cs
: Added logic to handle aliases provided as a list in Markdown files. The list items are extracted and added to the metadata dictionary under thealiases
key.Test coverage:
test/Pester/ImportMarkdownCommandHelp.Tests.ps1
: Added tests to verify that metadata aliases can be correctly parsed when provided as a list or a string in Markdown files. These tests ensure the expected alias values and counts are returned.PR Context