From 48aed6ba6192ffd9426efa30e71b8c450e8db446 Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Fri, 8 Feb 2019 16:10:02 +0700 Subject: [PATCH] rename link_and_parse -> link_map --- lib/auto_linker.ex | 4 ++-- test/auto_linker_test.exs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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/",