parse_yaml.parse_yaml_eval_from_node

convert.parse_yaml.parse_yaml_eval_from_node(src_bytes, metadata_node)

Parse YAML front matter and return execute.eval setting.

This function takes the YAML metadata block at the top of the document, parses it, and looks for an execute.eval value. Various string forms (like “false”, “no”, “0”) are normalised to a Python bool. If anything goes wrong, or no value is provided, it falls back to True.

Parameters

Name Type Description Default
src_bytes bytes UTF-8 encoded document source. required
metadata_node Node YAML metadata node (minus_metadata) from the AST. required

Returns

Name Type Description
bool The default eval setting; True if parsing fails or no explicit value is provided.