Skip to content

Multiline yaml #756

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 2, 2025
Merged

Multiline yaml #756

merged 4 commits into from
Jul 2, 2025

Conversation

adityapatwardhan
Copy link
Member

PR Summary

This pull request includes updates to improve metadata handling in markdown processing and enhance test coverage. The changes primarily focus on modifying how metadata is extracted and processed, adding support for multiline metadata, and updating test assets and cases accordingly.

Metadata Handling Improvements:

  • Updated GetMetadata method in src/MarkdownReader/CommandHelpMarkdownReader.cs to accept ParsedMarkdownContent instead of MarkdownDocument, allowing access to the full markdown content for metadata extraction. [1] [2]
  • Enhanced metadata parsing to handle multiline metadata blocks by iterating through markdown lines and converting them into an OrderedDictionary. This change ensures better support for complex metadata structures.

Test Enhancements:

  • Added a new test case to verify that multiline metadata can be correctly parsed and accessed.
  • Updated the test asset CimCmdlets2.md to include multiline metadata for testing purposes.
  • Adjusted metadata-related test counts to reflect the addition of new test cases and assets.

Codebase Adjustments:

  • Replaced MarkdownDocument.Ast references with ParsedMarkdownContent in other files (MarkdownProbeInfo.cs, ModuleFileMarkdownReader.cs) to maintain consistency with the updated metadata handling approach. [1] [2]

PR Context

Fixes #731

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Collaborator

@sdwheeler sdwheeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adityapatwardhan adityapatwardhan merged commit ff1d54a into v2 Jul 2, 2025
8 checks passed
@adityapatwardhan adityapatwardhan deleted the MultilineYaml branch July 2, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants