diff options
Diffstat (limited to 'pygments/lexers/erlang.py')
-rw-r--r-- | pygments/lexers/erlang.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pygments/lexers/erlang.py b/pygments/lexers/erlang.py index 0d0d0798..07a46c80 100644 --- a/pygments/lexers/erlang.py +++ b/pygments/lexers/erlang.py @@ -5,7 +5,7 @@ Lexers for Erlang. - :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -163,7 +163,7 @@ class ErlangShellLexer(Lexer): filenames = ['*.erl-sh'] mimetypes = ['text/x-erl-shellsession'] - _prompt_re = re.compile(r'\d+>(?=\s|\Z)') + _prompt_re = re.compile(r'(?:\([\w@_.]+\))?\d+>(?=\s|\Z)') def get_tokens_unprocessed(self, text): erlexer = ErlangLexer(**self.options) @@ -495,7 +495,7 @@ class ElixirConsoleLexer(Lexer): aliases = ['iex'] mimetypes = ['text/x-elixir-shellsession'] - _prompt_re = re.compile(r'(iex|\.{3})(\(\d+\))?> ') + _prompt_re = re.compile(r'(iex|\.{3})((?:\([\w@_.]+\))?\d+|\(\d+\))?> ') def get_tokens_unprocessed(self, text): exlexer = ElixirLexer(**self.options) |