PSA: Templates and YAML. Distinguishing Jinja from YAML

One other thing which confused me when first starting with Home Assistant templates:

You give the example here with the > character:

some_field: >
  {% set x = 4 %}
  {{ x }}

But I kept seeing examples of people using various syntax:

Apparently it relates to line folding in the YAML language. If the code that follows is split onto multiple lines, then the character used determines whether or not the new line characters are replaced with spaces or not (i.e. if the code is folded back together on a single line). Including the - character after either > or | determines what happens with the final line break in the code block.

The behaviour is nicely summarized here:

Is this described somewhere in the Home Assistant documentation? Or not, because it’s really part of learning YAML ?