YAML

YAML Multiline

Thanks to Steve Bennett on Stackoverflow

In this table, _ means space character. \n means “newline character”, except for the “in-line newlines” row, where it means literally a backslash and an n).

  > |   >- >+ |- | +
Trailing spaces Kept Kept       Kept Kept Kept Kept
Single newline => _ \n _ _ _ _ _ \n \n
Double newline => \n \n\n \n \n \n \n \n \n\n \n\n
Final newline => \n \n         \n   \n
Final dbl nl’s =>             Kept   Kept
In-line newlines No No No \n No No No No No
Spaceless newlines No No No \ No No No No No
Single quote ’’
Double quote "
Backslash \ \ \ \\ \ \ \ \ \
” #”, “: “ Ok Ok No Ok Ok Ok Ok Ok Ok
Can start on same line as key No No Yes Yes Yes No No No No