commit: 7fa967d708a450dbc3355bda0094da70fb0563d6
parent: 1b43744f1a1297611cbec34d8e368a0dee9b4d2d
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 1 Mar 2019 23:26:36 +0100
mix.deps: Change auto_linker to my branch
Diffstat:
5 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex
@@ -15,7 +15,9 @@ defmodule Pleroma.Formatter do
@auto_linker_config hashtag: true,
hashtag_handler: &Pleroma.Formatter.hashtag_handler/4,
mention: true,
- mention_handler: &Pleroma.Formatter.mention_handler/4
+ mention_handler: &Pleroma.Formatter.mention_handler/4,
+ phone: false,
+ extra_prefixes: Pleroma.Config.get([:uri_schemes, :valid_schemes])
def escape_mention_handler("@" <> nickname = mention, buffer, _, _) do
case User.get_cached_by_nickname(nickname) do
diff --git a/lib/pleroma/web/rich_media/helpers.ex b/lib/pleroma/web/rich_media/helpers.ex
@@ -14,7 +14,7 @@ defmodule Pleroma.Web.RichMedia.Helpers do
validate_tld = Application.get_env(:auto_linker, :opts)[:validate_tld]
page_url
- |> AutoLinker.Parser.url?(scheme: true, validate_tld: validate_tld)
+ |> AutoLinker.Parser.is_url?(scheme: true, validate_tld: validate_tld)
|> parse_uri(page_url)
end
diff --git a/mix.exs b/mix.exs
@@ -135,9 +135,7 @@ defmodule Pleroma.Mixfile do
{:ex_syslogger, github: "slashmili/ex_syslogger", tag: "1.4.0"},
{:timex, "~> 3.5"},
{:ueberauth, "~> 0.4"},
- {:auto_linker,
- git: "https://git.pleroma.social/pleroma/auto_linker.git",
- ref: "95e8188490e97505c56636c1379ffdf036c1fdde"},
+ {:auto_linker, git: "https://hacktivis.me/git/auto_linker.git", branch: "lanodan/master"},
{:http_signatures,
git: "https://git.pleroma.social/pleroma/http_signatures.git",
ref: "293d77bb6f4a67ac8bde1428735c3b42f22cbb30"},
diff --git a/mix.lock b/mix.lock
@@ -1,6 +1,6 @@
%{
"accept": {:hex, :accept, "0.3.5", "b33b127abca7cc948bbe6caa4c263369abf1347cfa9d8e699c6d214660f10cd1", [:rebar3], [], "hexpm"},
- "auto_linker": {:git, "https://git.pleroma.social/pleroma/auto_linker.git", "95e8188490e97505c56636c1379ffdf036c1fdde", [ref: "95e8188490e97505c56636c1379ffdf036c1fdde"]},
+ "auto_linker": {:git, "https://hacktivis.me/git/auto_linker.git", "71425bb5a4c0d8755b00a469763b75db8ce77899", [branch: "lanodan/master"]},
"base64url": {:hex, :base64url, "0.0.1", "36a90125f5948e3afd7be97662a1504b934dd5dac78451ca6e9abf85a10286be", [:rebar], [], "hexpm"},
"bbcode": {:hex, :bbcode, "0.1.1", "0023e2c7814119b2e620b7add67182e3f6019f92bfec9a22da7e99821aceba70", [:mix], [{:nimble_parsec, "~> 0.5", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm"},
"benchee": {:hex, :benchee, "1.0.1", "66b211f9bfd84bd97e6d1beaddf8fc2312aaabe192f776e8931cb0c16f53a521", [:mix], [{:deep_merge, "~> 1.0", [hex: :deep_merge, repo: "hexpm", optional: false]}], "hexpm"},
diff --git a/test/web/common_api/common_api_utils_test.exs b/test/web/common_api/common_api_utils_test.exs
@@ -154,14 +154,15 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
{:ok, user} =
UserBuilder.insert(%{nickname: "user__test", ap_id: "http://foo.com/user__test"})
- text = "**hello world**\n\n*another @user__test and @user__test google.com paragraph*"
+ text =
+ "**hello world**\n\n*another @user__test and @user__test http://google.com paragraph*"
expected =
"<p><strong>hello world</strong></p>\n<p><em>another <span class=\"h-card\"><a data-user=\"#{
user.id
}\" class=\"u-url mention\" href=\"http://foo.com/user__test\">@<span>user__test</span></a></span> and <span class=\"h-card\"><a data-user=\"#{
user.id
- }\" class=\"u-url mention\" href=\"http://foo.com/user__test\">@<span>user__test</span></a></span> <a href=\"http://google.com\">google.com</a> paragraph</em></p>\n"
+ }\" class=\"u-url mention\" href=\"http://foo.com/user__test\">@<span>user__test</span></a></span> <a href=\"http://google.com\">http://google.com</a> paragraph</em></p>\n"
{output, _, _} = Utils.format_input(text, "text/markdown")