MANUAL: add info about YAML escape sequences, link to spec.

Closes: #7152
This commit is contained in:
Albert Krewinkel 2021-05-14 22:43:38 +02:00
parent 013e4a3164
commit 46baf6659d
No known key found for this signature in database
GPG key ID: 388DC0B21F631124

View file

@ -4177,10 +4177,12 @@ option is used. All of the metadata will appear in a single block
at the beginning of the document.
Note that [YAML] escaping rules must be followed. Thus, for example,
if a title contains a colon, it must be quoted. The pipe character
(`|`) can be used to begin an indented block that will be interpreted
literally, without need for escaping. This form is necessary
when the field contains blank lines or block-level formatting:
if a title contains a colon, it must be quoted, and if it contains a
backslash escape, then it must be ensured that it is not treated as a
[YAML escape sequence]. The pipe character (`|`) can be used to begin
an indented block that will be interpreted literally, without need for
escaping. This form is necessary when the field contains blank lines
or block-level formatting:
---
title: 'This is the title: it contains a colon'
@ -4255,6 +4257,7 @@ following restrictions apply:
example, you can't use a reference link in these contexts
if the link definition is somewhere else in the document.
[YAML escape sequence]: https://yaml.org/spec/1.2/spec.html#id2776092
## Backslash escapes