elixir-makeup / makeup_erlang

Erlang lexer for Makeup
3 stars 6 forks source link

MatchError when trying to lex some unicode emojis #27

Closed ericmj closed 6 months ago

ericmj commented 6 months ago
iex(1)> Makeup.highlight("fun($🫂 ) -> ok.", lexer: Makeup.Lexers.ErlangLexer)
** (MatchError) no match of right hand side value: {:ok, [{:whitespace, %{language: :erlang}, "\n"}, {:name_function, %{language: :erlang}, "fun"}, {:punctuation, %{language: :erlang}, "("}, {:string_char, %{language: :erlang}, ["$", 240]}], <<159, 171, 130, 32, 41, 32, 45, 62, 32, 111, 107, 46>>, %{}, {2, 1}, 7}
    (makeup_erlang 0.1.5) lib/makeup/lexers/erlang_lexer.ex:442: Makeup.Lexers.ErlangLexer.lex/2
    (makeup 1.1.1) lib/makeup.ex:37: Makeup.highlight/2
    iex:1: (file)