rename link_and_parse -> link_map

This commit is contained in:
Egor Kislitsyn 2019-02-08 16:10:02 +07:00
parent 4da0c84ba1
commit 48aed6ba61
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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/",