A value for a YAML front matter line: a double-quoted scalar in which a quote, a backslash and every control character are escaped (K13, CR-12). A JSON string is a valid YAML double-quoted scalar; the three Unicode line separators that JSON leaves as they are would break a line in YAML, so they are escaped too.

Methods

yaml_string

yaml_string(text: object) -> str

A value for a YAML front matter line: a double-quoted scalar in which a quote, a backslash and every control character are escaped (K13, CR-12). A JSON string is a valid YAML double-quoted scalar; the three Unicode line separators that JSON leaves as they are would break a line in YAML, so they are escaped too.

ParameterTypeDescription
textobject

Generated with Flude

Copyright © 2026