1# Use > most of the time: interior line breaks are stripped out, although you get one at the end:
2
3key: >
4 Your long
5 string here.
6
7
8# Use | if you want those linebreaks to be preserved as \n (for instance, embedded markdown with paragraphs).
9
10key: |
11 ### Heading
12
13 * Bullet
14 * Points
15
16# Use >- or |- instead if you don't want a linebreak appended at the end.
17# Use "..." if you need to split lines in the middle of words or want to literally type linebreaks as \n:
18
19key: "Antidisestab\
20 lishmentarianism.\n\nGet on it."1Key: >
2 This is a very long sentence
3 that spans several lines in the YAML
4 but which will be rendered as a string
5 with only a single carriage return appended to the end.
6
7# You can use the "block chomping indicator" to eliminate the trailing line break, as follows:
8
9Key: >-
10 This is a very long sentence
11 that spans several lines in the YAML
12 but which will be rendered as a string
13 with NO carriage returns.
14