A cheatsheet for YAML basic syntax, block modifiers, and special characters.
|
and |-
.
|
preserves all trailing newlines, while |-
removes all trailing newlines.Only use >
when you want to convert newlines to spaces: i.e. when you want to make a long single-line string more readable.\n
in YAML.