You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @peterfigure, thanks for the suggestion. Just to clarify, are you asking that any multi-line string values are automatically emitted as block scalars?
If so, that should be pretty straightforward to add as a PR if you're keen:
This is where emitting strings happens - it would need to detect if the string contains a newline character and choose a different style (ScalarStyle.LITERAL looks right)
We should probably make this behaviour configurable, so you'd need to add an option to YamlConfiguration
Describe the problem you'd like to solve
Working on a DSL for github actions, would be really nice if a multiline string or list of strings gets rendered as a block scalar, eg: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
It makes for much easier debugging & readability than
\n
separated stringsDescribe the solution you'd like
https://yaml-multiline.info/ literal block scalars using the
|
symbolDescribe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: