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

Fixing YAML handling of multiline literals in some cases #4924

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

greg-at-moderne
Copy link
Contributor

What's changed?

Fixing the handling of an edge-case of a YAML with:

  • multiline literals using the | syntax
  • and quoted identifiers.

What's your motivation?

In some scenarios the YAML parser tends to swallow the first letter of the literal:

 - "one": |
     two
-  "three": "four"
+  "hree": "four"
] 

which is clearly a bug.

@greg-at-moderne greg-at-moderne added bug Something isn't working parser-yaml labels Jan 20, 2025
@greg-at-moderne greg-at-moderne self-assigned this Jan 20, 2025
Copy link
Contributor

@knutwannheden knutwannheden left a comment

Choose a reason for hiding this comment

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

Nice find!

@greg-at-moderne greg-at-moderne merged commit 0b3dfb9 into main Jan 20, 2025
2 checks passed
@greg-at-moderne greg-at-moderne deleted the yaml-swallowing-letters branch January 20, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser-yaml
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants