diff --git a/lib/dsl/html.ex b/lib/dsl/html.ex index 296035f..f7b8cd8 100644 --- a/lib/dsl/html.ex +++ b/lib/dsl/html.ex @@ -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, "
Hello, world!
"} + ``` + """ defmacro text(text) do quote do Utils.put_buffer(