PromptRunner.FrontMatter (PromptRunnerSDK v0.7.0)

Copy Markdown View Source

Markdown front matter reader and writer used by Prompt Runner packet files.

Summary

Types

document()

@type document() :: %{attributes: map(), body: String.t()}

Functions

dump(attrs, body \\ "")

@spec dump(map(), String.t()) :: String.t()

load_file(path)

@spec load_file(String.t()) :: {:ok, document()} | {:error, term()}

parse(content)

@spec parse(String.t()) :: {:ok, document()} | {:error, term()}

write_file(path, attrs, body \\ "")

@spec write_file(String.t(), map(), String.t()) :: :ok | {:error, term()}