Clean up deftag generated macros

This commit is contained in:
Mitchell Hanberg 2019-04-14 22:36:16 -04:00
parent 85d6b8586f
commit 2727d346b6
2 changed files with 2 additions and 10 deletions

View file

@ -115,7 +115,7 @@ defmodule Dsl.Html do
end
quote do
unquote(name)(unquote(attrs), unquote(inner), unquote(outer))
unquote(name)(unquote(attrs), unquote(inner))
end
end
@ -123,14 +123,6 @@ defmodule Dsl.Html do
outer = unquote(Macro.escape(block))
name = unquote(name)
quote do
unquote(name)(unquote(attrs), unquote(inner), unquote(outer))
end
end
defmacro unquote(name)(attrs, inner, outer) do
outer = unquote(Macro.escape(block))
{tag, meta, [old_attrs]} = outer
attrs = [

View file

@ -166,7 +166,7 @@ defmodule Dsl.HtmlTest do
result =
htm do
flex class: "justify-between", id: "king"
flex(class: "justify-between", id: "king")
end
assert result =~ ~s{class="flex justify-between"}