YAML tricks
(, en)
Multiline Blocks
# ┌── bock style
# │┌─ block chomping
# ││
key: |-
Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.
\N
non-space character
\n
newline
style | |
---|---|
| |
keep as is (literal) |
> |
replace \N\n\N with \N \N (folded) |
chomping | |
---|---|
(nothing) | single \n at the end (clip) |
- |
no newline at the end (strip) |
+ |
keep everything (keep) |