-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
missing: yaml:dump() option to export multi-line strings as string literal #16604
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
Comments
Hi there, can you please provide some samples of the current and expected behaviour? |
Sure.
Which is valid YAML, and YAML::parse() is fine to parse. So maybe my script needs to increase the number in this configurationfile.
which will result in:
Which is totally fine and valid YAML, but quite annoying to edit by hand. Also what's up with your bee? :) |
👍 Yes please! |
…cks (xabbuh) This PR was merged into the 3.1-dev branch. Discussion ---------- [Yaml] option to dump multi line strings as scalar blocks | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #16236, #16604, #17912, #17391 | License | MIT | Doc PR | TODO Commits ------- eff6902 option to dump multi line strings as scalar blocks
Hi,
i Need to dump datastructures as Yaml, having multiline-strings as String-literals.
yaml::parse is able to read string in this format, mit you can't dump it.
So for now i have hacked the dumper to do what i need, but that's not nice.
I would happily implement that correct, write tests and documentation and send a pull-request, but i would like to here if that is something you would like to see in your code.
Also we should talk about how to trigger that behavior. Should i just add another Parameter $useStringLiteral = false ?
Greetings Schorsch
The text was updated successfully, but these errors were encountered: