From 2727d346b6cf3f76579e9b648712507d2f22123d Mon Sep 17 00:00:00 2001 From: Mitchell Hanberg Date: Sun, 14 Apr 2019 22:36:16 -0400 Subject: [PATCH] Clean up deftag generated macros --- lib/dsl/html.ex | 10 +--------- test/dsl/html_test.exs | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/dsl/html.ex b/lib/dsl/html.ex index 51a35d9..6b6972d 100644 --- a/lib/dsl/html.ex +++ b/lib/dsl/html.ex @@ -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 = [ diff --git a/test/dsl/html_test.exs b/test/dsl/html_test.exs index f3b2e18..b99798c 100644 --- a/test/dsl/html_test.exs +++ b/test/dsl/html_test.exs @@ -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"}