Erlang and Elixir shell lexers don't recognize node names in prompts

Create issue
Issue #1521 resolved
Yuce Tekol created an issue

Erlang and Elixir shell prompts may have the node name as a prefix. lexers.ErlangShellLexer doesn't highlight the prompt in the text below:

Erlang/OTP 22 [erts-10.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Eshell V10.4  (abort with ^G)
(> {any,} ! {hello, world}.
(> flush().
Shell got {hello,world}

Updating lexers.ErlangShellLexer fixes the issue:

_prompt_re = re.compile(r'(?:\([\w@_.]+\))?\d+>(?=\s|\Z)')

lexers.ElixirConsoleLexer doesn’t highlight the prompt in the following text:

Erlang/OTP 22 [erts-10.4] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Interactive Elixir (1.8.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(c1@ichi.cs)1> IO.puts("hello!")

Updating lexers.ElixirConsoleLexer fixes the issue:

_prompt_re = re.compile(r'(iex|\.{3})((?:\([\w@_.]+\))?\d+|\(\d+\))?> ')

Comments (4)

  1. Log in to comment