Skip to main content

Module edit

Module edit 

Source
Expand description

Canonical YAML emission for editors that splice bytes into authored frontmatter.

One rule decides how every string, key or value, is spelled: plain when it is a safe identifier-like word, JSON double-quoted otherwise. Quoted strings escape every character YAML parsers disagree about, so the output reads back as the same value in serde_yaml and in other YAML libraries.

Enums§

EmitError
A value that cannot be written as YAML without changing it.

Functions§

emit_value
Emit one JSON-compatible value for the mapping key at column indent.
rewrite_block
Emit a whole frontmatter mapping: the block between the --- fences, keys in order, ending in exactly one newline (empty for no keys).