-
format_front_matter()andwrite_front_matter()now infer the delimiter
automatically whendelimiter = NULL(the new default). Ifxwas returned
byparse_front_matter()orread_front_matter(), the original fence style
is preserved; otherwisewrite_front_matter()falls back to the file
extension ofpath, and finally to"yaml"(#8). -
Added support for shebang lines (
#!) at the start of files. When a file
begins with a shebang, the parser now recognizes front matter in
comment-wrapped formats (# ---,#' ---) and PEP 723 (# /// script)
immediately following the shebang (with zero or one blank lines in between).
The shebang line is included in the returnedbody.format_front_matter()
andwrite_front_matter()also move a leading shebang line above the front
matter block when writing (#5). -
Added SQL front matter support with two comment styles: line comments
(-- ---/-- +++) and block comments in compact (/* ---...--- */) and
expanded (/*+---...---+*/) forms. Six new delimiter shortcuts
are available forwrite_front_matter():yaml_sql_line,
toml_sql_line,yaml_sql_block_compact,toml_sql_block_compact,
yaml_sql_block_expanded, andtoml_sql_block_expanded(#4).