We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bfe2c9c + c5e19ec commit 7a4bb6bCopy full SHA for 7a4bb6b
lib/exmoji/scanner.ex
@@ -34,11 +34,13 @@ defmodule Exmoji.Scanner do
34
# new algorithm produces identical results.
35
#
36
# 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})")
39
@doc false
+ @fbs_pattern Exmoji.chars(include_variants: true) |> Enum.join("|")
+
40
def rscan(str) do
41
- Regex.scan(@fbs_regexp, str)
+ "(?:#{@fbs_pattern})"
42
+ |> Regex.compile!()
43
+ |> Regex.scan(str)
44
|> Enum.map(&List.first/1)
45
end
46
0 commit comments