   end
   # Ignores comments
   defp find_by_selector(_selector, {:comment, _comment}, _, acc), do: acc
-  defp find_by_selector(selector, node, matcher, acc) when is_tuple(node) do
+  defp find_by_selector(selector, node, matcher, acc) do
     {_, _, child_node} = node
 
     acc = matcher.(selector, node, acc)

  end

  defp attribute_match?(attributes, attribute_name, selector_value) do
    Enum.find(attributes, fn(attribute) ->
      {attr_name, attr_value} = attribute

      attr_name == attribute_name && value_match?(attr_value, selector_value)
    end)
  end

  defp find_by_selector(_selector, {}, _, acc), do: acc
  defp find_by_selector(_selector, [], _, acc), do: acc

      {"div", [{"class", "js-action"}], ["hello world"]}

  """

  @spec parse(binary) :: html_tree

  def parse(html) do
    :mochiweb_html.parse(html)
  end


  @doc """
  Finds elements inside a HTML tree or string.
