Skip to content
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

fix: improve handling for YAML version directives #1038

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thevilledev
Copy link
Contributor

The YAML parser was incorrectly splitting documents with version directives (e.g. '%YAML 1.1') by treating the first '---' marker as a document separator. This caused the version directive to be separated from its document, resulting in parsing errors. Fixed document separation logic to keep version directive with its document.

Added test cases for various YAML scenarios and improved test coverage.

Fixes #998

The YAML parser was incorrectly splitting documents with version directives
(e.g. '%YAML 1.1') by treating the first '---' marker as a document separator.
This caused the version directive to be separated from its document,
resulting in parsing errors. Fixed document separation logic to keep
version directive with its document.

Added test cases for various YAML scenarios and improved test coverage.

Signed-off-by: Ville Vesilehto <[email protected]>
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.

Conftest fails on YAMLs with version
1 participant