diff options
author | Georg Brandl <georg@python.org> | 2014-10-16 09:33:43 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-10-16 09:33:43 +0200 |
commit | 5727fe42393a86817bd0f702d93c3fc399b68eb3 (patch) | |
tree | 796e787baf37e7362a802aaf9b6303127ff35098 /pygments/lexers/erlang.py | |
parent | f8f38adf82e18ea5c33d532ab3429bb22eed0921 (diff) | |
download | pygments-5727fe42393a86817bd0f702d93c3fc399b68eb3.tar.gz |
Fix "matches empty string" complaints from regexlint.
Diffstat (limited to 'pygments/lexers/erlang.py')
-rw-r--r-- | pygments/lexers/erlang.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pygments/lexers/erlang.py b/pygments/lexers/erlang.py index 89dcf336..6aa336db 100644 --- a/pygments/lexers/erlang.py +++ b/pygments/lexers/erlang.py @@ -12,7 +12,7 @@ import re from pygments.lexer import Lexer, RegexLexer, bygroups, words, do_insertions, \ - include + include, default from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Generic @@ -293,7 +293,10 @@ class ElixirLexer(RegexLexer): (name + '-end', name + '-no-intp')), ] - states[name + '-end'] = [(r'[a-zA-Z]*', token, '#pop')] + states[name + '-end'] = [ + (r'[a-zA-Z]+', token, '#pop'), + default('#pop'), + ] states[name + '-intp'] = [ (r'^\s*' + term, String.Heredoc, '#pop'), include('heredoc_interpol'), |