     Enum.reverse(result)
   end
 
-  defp parse_line(line, {current_section, result} = state) do
+  defp parse_line(line, {current_section, result} = state) when is_binary(line) do
     cond do
       String.match?(line, ~r/^##\s*\w+/) ->
         [subsection] = Regex.run(~r/^##\s*(.+)$/, line, capture: :all_but_first)

defmodule AwesomeElixir.AwesomeList.Parser do
  defmodule Entity do
    defstruct url: nil, name: nil, section: {}
  end


      String.match?(line, ~r/^\*\w+/) ->
        [subsection_description] = Regex.run(~r/^\*(.+)\*$/, line, capture: :all_but_first)
        {%Section{name: current_section, description: subsection_description}, result}

      String.match?(line, ~r/^\*\s+\[\w+/) ->
        [name, url] = Regex.run(~r/^\*\s+\[(.+?)\]\((.+?)\)/, line, capture: :all_but_first)
