   Creates an HTML tag with the given name and options.
 
       iex> tag(:br)
-      {:safe, "<br>"}
+      {:safe, [60, "br", [], 62]}
       iex> tag(:input, type: "text", name: "user_id")
-      {:safe, "<input name=\"user_id\" type=\"text\">"}
+      {:safe, [60, "input", [[32, "name", 61, 34, "user_id", 34], [32, "type", 61, 34, "text", 34]], 62]}
 
   ## Data attributes
 

    end
  end

  defp build_attrs(_tag, []), do: ""
  defp build_attrs(tag, attrs), do: build_attrs(tag, attrs, [])

  defp build_attrs(_tag, [], acc),

  the attribute is completely removed if it is false:

      iex> tag(:audio, autoplay: true)
      {:safe, [60, "audio", [[32, "autoplay", 61, 34, "autoplay", 34]], 62]}
      iex> tag(:audio, autoplay: false)
      {:safe, [60, "audio", [], 62]}

  If you want the boolean attribute to be sent as is,
  you can explicitly convert it to a string before.
  """
  def tag(name), do: tag(name, [])
  def tag(name, attrs) when is_list(attrs) do
    {:safe, [?<, to_string(name), build_attrs(name, attrs), ?>]}
  end

  @doc ~S"""
  Creates an HTML tag with given name, content, and attributes.

      iex> content_tag(:p, "Hello")
      {:safe, [60, "p", [], 62, "Hello", 60, 47, "p", 62]}
      iex> content_tag(:p, "<Hello>", class: "test")
      {:safe, [60, "p", [[32, "class", 61, 34, "test", 34]], 62, "&lt;Hello&gt;", 60, 47, "p", 62]}

      iex> content_tag :p, class: "test" do
      ...>   "Hello"
      ...> end
      {:safe, [60, "p", [[32, "class", 61, 34, "test", 34]], 62, "Hello", 60, 47, "p", 62]}
  """
  def content_tag(name, [do: block]) when is_atom(name) do
    content_tag(name, block, [])
