rename link_and_parse -> link_map
This commit is contained in:
parent
4da0c84ba1
commit
48aed6ba61
2 changed files with 4 additions and 4 deletions
|
@ -54,7 +54,7 @@ defmodule AutoLinker do
|
||||||
parse({text, nil}, opts) |> elem(0)
|
parse({text, nil}, opts) |> elem(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
def link_and_parse(text, parsed, opts \\ []) do
|
def link_map(text, acc, opts \\ []) do
|
||||||
parse({text, parsed}, opts)
|
parse({text, acc}, opts)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -66,7 +66,7 @@ defmodule AutoLinkerTest do
|
||||||
end
|
end
|
||||||
|
|
||||||
{result_text, %{mentions: mentions}} =
|
{result_text, %{mentions: mentions}} =
|
||||||
AutoLinker.link_and_parse(text, %{mentions: MapSet.new()},
|
AutoLinker.link_map(text, %{mentions: MapSet.new()},
|
||||||
mention: true,
|
mention: true,
|
||||||
mention_handler: handler
|
mention_handler: handler
|
||||||
)
|
)
|
||||||
|
@ -86,7 +86,7 @@ defmodule AutoLinkerTest do
|
||||||
end
|
end
|
||||||
|
|
||||||
{result_text, %{tags: tags}} =
|
{result_text, %{tags: tags}} =
|
||||||
AutoLinker.link_and_parse(text, %{tags: MapSet.new()},
|
AutoLinker.link_map(text, %{tags: MapSet.new()},
|
||||||
hashtag: true,
|
hashtag: true,
|
||||||
hashtag_handler: handler,
|
hashtag_handler: handler,
|
||||||
hashtag_prefix: "https://example.com/user/",
|
hashtag_prefix: "https://example.com/user/",
|
||||||
|
|
Reference in a new issue