diff --git a/lib/auto_linker.ex b/lib/auto_linker.ex index ace5b51..0a07a9b 100644 --- a/lib/auto_linker.ex +++ b/lib/auto_linker.ex @@ -54,7 +54,7 @@ defmodule AutoLinker do parse({text, nil}, opts) |> elem(0) end - def link_and_parse(text, parsed, opts \\ []) do - parse({text, parsed}, opts) + def link_map(text, acc, opts \\ []) do + parse({text, acc}, opts) end end diff --git a/test/auto_linker_test.exs b/test/auto_linker_test.exs index c9835a7..8f6f2cd 100644 --- a/test/auto_linker_test.exs +++ b/test/auto_linker_test.exs @@ -66,7 +66,7 @@ defmodule AutoLinkerTest do end {result_text, %{mentions: mentions}} = - AutoLinker.link_and_parse(text, %{mentions: MapSet.new()}, + AutoLinker.link_map(text, %{mentions: MapSet.new()}, mention: true, mention_handler: handler ) @@ -86,7 +86,7 @@ defmodule AutoLinkerTest do end {result_text, %{tags: tags}} = - AutoLinker.link_and_parse(text, %{tags: MapSet.new()}, + AutoLinker.link_map(text, %{tags: MapSet.new()}, hashtag: true, hashtag_handler: handler, hashtag_prefix: "https://example.com/user/",