Use escapes like newline and tab in YAML strings.
Section: Strings and quoting
Double-quoted string
yaml
yaml
message: "Line 1\nLine 2"Explanation
Double quotes support common escape sequences and are useful for values needing explicit escaping.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Strings and quoting
Single-quoted string
Keep backslashes literal and avoid interpolation-like behavior.
Folded block scalar
Wrap multi-line text into a single logical paragraph with `>`.
Quote ambiguous boolean-like words
Avoid implicit booleans by quoting risky strings.
Quote date-like values
Prevent timestamps and date-like tokens from being auto-typed.