summaryrefslogtreecommitdiff
path: root/pygments/lexers/erlang.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-10-16 09:33:43 +0200
committerGeorg Brandl <georg@python.org>2014-10-16 09:33:43 +0200
commit5727fe42393a86817bd0f702d93c3fc399b68eb3 (patch)
tree796e787baf37e7362a802aaf9b6303127ff35098 /pygments/lexers/erlang.py
parentf8f38adf82e18ea5c33d532ab3429bb22eed0921 (diff)
downloadpygments-5727fe42393a86817bd0f702d93c3fc399b68eb3.tar.gz
Fix "matches empty string" complaints from regexlint.
Diffstat (limited to 'pygments/lexers/erlang.py')
-rw-r--r--pygments/lexers/erlang.py7
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'),