Skip to content

Commit 7a4bb6b

Browse files
authored
Merge pull request #34 from mroth/fb/ex119
Fix Elixir 1.19 warning
2 parents bfe2c9c + c5e19ec commit 7a4bb6b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/exmoji/scanner.ex

+5-3
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ defmodule Exmoji.Scanner do
3434
# new algorithm produces identical results.
3535
#
3636
# Thus it is kept as public so we can compare it in test...
37-
fbs_pattern = Exmoji.chars(include_variants: true) |> Enum.join("|")
38-
@fbs_regexp Regex.compile!("(?:#{fbs_pattern})")
3937
@doc false
38+
@fbs_pattern Exmoji.chars(include_variants: true) |> Enum.join("|")
39+
4040
def rscan(str) do
41-
Regex.scan(@fbs_regexp, str)
41+
"(?:#{@fbs_pattern})"
42+
|> Regex.compile!()
43+
|> Regex.scan(str)
4244
|> Enum.map(&List.first/1)
4345
end
4446

0 commit comments

Comments
 (0)