format YAML headers as in core