Skip to content

Commit 72bbaba

Browse files
committed
docs: add example for convert! function in module documentation
1 parent 727f300 commit 72bbaba

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/htmd.ex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ defmodule Htmd do
1111
iex> Htmd.convert("<h1>Hello World</h1>")
1212
{:ok, "# Hello World"}
1313
14+
## If you want to ignore errors and get an empty string on failure
15+
16+
iex> Htmd.convert!("<h1>Hello World</h1>")
17+
"# Hello World"
18+
1419
## Advanced Usage with Options
1520
1621
iex> Htmd.convert("<h1>Title</h1><ul><li>Item</li></ul>", [

0 commit comments

Comments
 (0)