# Yaml multiline strings

First, decide whether you want to fold newlines or preserve them using the *Block Style Indicator*. There are two options:

* The literal style (`|`) will preserve newlines
* The folded style (`>`) will replace newlines with spaces

(To get a newline using the folded style, use a blank line (two newlines).)

```yaml
multiline: >
  this will
  be a single
  line

  but this will be a
  separate one
```

```yaml
multiline: |
  these newlines
  will be preserved
```

Then there are options for newlines at the end:

* `|-` will strip newlines
* `|+` will keep all trailing newlines
* `|` (specifying nothing) will leave a single newline

These options are available both in the folded and the literal style.

[Source](https://yaml-multiline.info/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://notes.eliasnorrby.com/yaml/multiline-strings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
