diff --git a/lib/linkify/parser.ex b/lib/linkify/parser.ex index dbb27fb..023b3b5 100644 --- a/lib/linkify/parser.ex +++ b/lib/linkify/parser.ex @@ -83,9 +83,6 @@ defmodule Linkify.Parser do defp do_parse({"", user_acc}, _opts, {"", acc, _}), do: {Enum.reverse(acc), user_acc} - defp do_parse({"@" <> text, user_acc}, opts, {buffer, acc, :skip}), - do: do_parse({text, user_acc}, opts, {"", accumulate(acc, buffer, "@"), :skip}) - defp do_parse( {"<" <> text, user_acc}, %{hashtag: true} = opts, @@ -124,10 +121,6 @@ defmodule Linkify.Parser do defp do_parse({"<" <> text, user_acc}, opts, {"", acc, :parsing}), do: do_parse({text, user_acc}, opts, {"<", acc, {:open, 1}}) - defp do_parse({"<" <> text, user_acc}, opts, {"", acc, {:html, level}}) do - do_parse({text, user_acc}, opts, {"<", acc, {:open, level + 1}}) - end - defp do_parse({">" <> text, user_acc}, opts, {buffer, acc, {:attrs, _level}}), do: do_parse({text, user_acc}, opts, {"", accumulate(acc, buffer, ">"), :parsing}) @@ -135,27 +128,6 @@ defmodule Linkify.Parser do do_parse({text, user_acc}, opts, {"", accumulate(acc, <>), {:attrs, level}}) end - defp do_parse({" text, user_acc}, opts, {buffer, acc, {:html, level}}) do - {buffer, user_acc} = link(buffer, opts, user_acc) - - do_parse( - {text, user_acc}, - opts, - {"", accumulate(acc, buffer, "" <> text, user_acc}, opts, {buffer, acc, {:close, 1}}), - do: do_parse({text, user_acc}, opts, {"", accumulate(acc, buffer, ">"), :parsing}) - - defp do_parse({">" <> text, user_acc}, opts, {buffer, acc, {:close, level}}), - do: - do_parse( - {text, user_acc}, - opts, - {"", accumulate(acc, buffer, ">"), {:html, level - 1}} - ) - defp do_parse({text, user_acc}, opts, {buffer, acc, {:open, level}}) do do_parse({text, user_acc}, opts, {"", accumulate(acc, buffer), {:attrs, level}}) end