Skip to content

Refactor YAML document parsing to handle valid separators closes #341#342

Closed
misraved wants to merge 2 commits into
mainfrom
fix-yaml-formatter-issue
Closed

Refactor YAML document parsing to handle valid separators closes #341#342
misraved wants to merge 2 commits into
mainfrom
fix-yaml-formatter-issue

Conversation

@misraved
Copy link
Copy Markdown
Contributor

@misraved misraved commented Dec 2, 2025

Example query results

Results
Add example SQL query results here (please include the input queries as well)

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors YAML document parsing to correctly handle YAML document separators by using a regex-based approach instead of a simple string split. The change prevents false splits on --- that appear inside block scalars or other string values.

Key Changes

  • Replaced strings.Split(string(content), "---") with a new splitYAMLDocuments() function that uses regex to match valid YAML document separators
  • Added comprehensive documentation explaining the rationale for the change

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread kubernetes/utils.go Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 1, 2026

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions Bot added the stale No recent activity has been detected on this issue/PR and it will be closed label Feb 1, 2026
@misraved misraved removed the stale No recent activity has been detected on this issue/PR and it will be closed label Feb 24, 2026
@misraved
Copy link
Copy Markdown
Contributor Author

misraved commented Mar 6, 2026

Closing the PR in favour of #349

@misraved misraved closed this Mar 6, 2026
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.

Yaml stream separator in a string breaks parsing manifests

2 participants