Skip to main content

Module extractor

Module extractor 

Source
Expand description

This module provides functionality for extracting frontmatter from content.

It includes functions to extract frontmatter in various formats (YAML, TOML, JSON) from a given string content, as well as utilities to detect the format of the frontmatter.

Functionsยง

detect_format
Detects the format of the extracted frontmatter.
extract_delimited_frontmatter
Extracts frontmatter enclosed by the given start and end delimiters.
extract_json_frontmatter
Extracts JSON frontmatter from the content by detecting balanced curly braces ({}).
extract_raw_frontmatter
Extracts raw frontmatter from the content, detecting YAML, TOML, or JSON formats.