YAML & Config
YAML Multiline Strings
Choose a block scalar when a YAML value needs more than one line. The marker controls whether line breaks are preserved or folded.
Published
Choose the block style
Literal | vs folded >
Preserves line breaks
script: |
npm ci
npm testUse it for scripts, certificates and text whose line structure matters.
Folds ordinary lines
summary: >
Build completed
without errors.Use it for readable wrapped prose that should become one sentence.
Decision
When should I use | or >?
- Need exact line breaks?Use |
- Need readable wrapped prose?Use >
Interactive proof
See chomping and indentation in real YAML
Choose a block scalar preset, then load it into the actual YAML Formatter to validate and edit it.
Why this fails
Block content must sit below the key
message: |
first linemessage: |
first linePractice with the full tool
Format your multiline YAML
Use your own YAML and check indentation, block scalars and formatting in the full local-first workflow.