text/1 docs

This commit is contained in:
Mitchell Hanberg 2019-05-10 15:13:04 -04:00
parent 06cbdd80ff
commit 15ac084aed

View file

@ -147,6 +147,19 @@ defmodule Dsl.Html do
end
end
@doc """
Emits a text node into the markup.
```
htm do
div do
text "Hello, world!"
end
end
# {:safe, "<div>Hello, world!</div>"}
```
"""
defmacro text(text) do
quote do
Utils.put_buffer(