diff options
author | William Pitcock <nenolod@dereferenced.org> | 2018-08-24 18:18:48 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-08-24 18:22:47 +0000 |
commit | 3e10d13909d3801d26b5cbf86a376e2ed370e2cc (patch) | |
tree | b686a54478010311f24bc4fd797e9e548ec120c9 /lib | |
parent | 14d11877022b8ee4f770e0c851c0c6f324b31810 (diff) | |
download | pleroma-3e10d13909d3801d26b5cbf86a376e2ed370e2cc.tar.gz |
formatter: adjust regexp captures to match local users with single character nicknames (closes #163)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/formatter.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex index 3e71a3b5f..cf2944c38 100644 --- a/lib/pleroma/formatter.ex +++ b/lib/pleroma/formatter.ex @@ -16,7 +16,7 @@ defmodule Pleroma.Formatter do def parse_mentions(text) do # Modified from https://www.w3.org/TR/html5/forms.html#valid-e-mail-address regex = - ~r/@[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@?[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*/u + ~r/@[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]*@?[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*/u Regex.scan(regex, text) |> List.flatten() |