View Source Djot (Djot v0.1.5)
Transform a Djot string input to HTML output.
No sanitization is performed, the document comes directly from the Djot transformer.
Various options are accepted to control the Djot renderer output. See Djot.Options
for details
Summary
Functions
@spec to_html(String.t(), Djot.Options.t() | Enumerable.t()) :: {:ok, String.t()} | {:error, :djot_transform}
Converts a Djot document into HTML
Returns a tuple
Examples
iex> Djot.to_html("Hello World!")
{:ok, "<p>Hello World!</p>\n"}
@spec to_html!(String.t(), Djot.Options.t() | Enumerable.t()) :: String.t()
Converts a Djot document into HTML
Returns the document or throws an error
Examples
iex> Djot.to_html!("Hello World!")
"<p>Hello World!</p>\n"