copied from Stack Overflow
> → interior line breaks are stripped out, although you get one at the end.| → line breaks are preserved as \n>- → like > but without trailing line break |- → like | but without trailing line breakIn this table: \b means space character, \n means “newline character” except where noted. “Leading space” refers to an additional space character on the second line, when the first characters are only spaces (which establishes the indent).
> | | | >- | |- | >+ | |+ | " | ' |
||
|---|---|---|---|---|---|---|---|---|---|
| Spaces/newlines converted to: | |||||||||
| Trailing space | \b | \b | \b | \b | \b | \b | |||
| Leading space | \n\b | \n\b | \n\b | \n\b | \n\b | \n\b | |||
| Single newline | \b | \n | \b | \n | \b | \n | \b | \b | \b |
| Double newline | \n | \n\n | \n | \n\n | \n | \n\n | \n | \n | \n |
| Final newline | \n | \n | \n | \n | |||||
| Final double newline | \n | \n | \n\n | \n\n | |||||
| How to create a literal: | |||||||||
| Single quote | ' | ' | ' | ' | ' | ' | ' | ' | '' |
| Double quote | “ | ” | “ | ” | “ | ” | “ | \” | “ |
| Backslash | \ | \ | \ | \ | \ | \ | \ | \\ | \ |
| Other features | |||||||||
| In-line newlines with literal \n | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | ✅ | 🚫 |
Spaceless newlines with \ | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | ✅ | 🚫 |
| # or : in value | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | 🚫 | ✅ | ✅ |
| Can start on same line as key | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | 🚫 | ✅ | ✅ | ✅ |