Skip to main content

parse

Function parse 

Source
pub fn parse(bytes: &[u8]) -> Result<ParseResult, ParseError>
Expand description

Parse a .prompt file from raw bytes.

Determines the tier, splits frontmatter from body, extracts Handlebars variables, and validates required fields.

ยงErrors

Returns ParseError if the file exceeds 1 MB, is not valid UTF-8, or has malformed YAML frontmatter.