# `Djot`
[🔗](https://github.com/paradox460/djot/blob/v0.1.6/lib/djot.ex#L1)

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

# `to_html`

```elixir
@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"}
```

# `to_html!`

```elixir
@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"
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
