commit: 8d88833dc5cbcc64e1e3ebfe82aa4d960059adb8
parent 74afaca73b6b688d87e48a88ee8e8e3ee8421294
Author: Sergey Suprunenko <suprunenko.s@gmail.com>
Date: Tue, 1 Sep 2020 13:31:21 +0200
Remove unused clauses
Diffstat:
1 file changed, 0 insertions(+), 28 deletions(-)
diff --git 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, <<ch::8>>), {: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, "</"), {:close, level}}
- )
- end
-
- defp do_parse({">" <> 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