From 15ac084aed37f4c1f17386f610002f46fa35d201 Mon Sep 17 00:00:00 2001 From: Mitchell Hanberg Date: Fri, 10 May 2019 15:13:04 -0400 Subject: [PATCH] text/1 docs --- lib/dsl/html.ex | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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(