diff options
author | Gaurav Jain <gaurav@gauravjain.org> | 2014-05-18 04:17:32 -0400 |
---|---|---|
committer | Gaurav Jain <gaurav@gauravjain.org> | 2014-05-18 04:17:32 -0400 |
commit | 99fba293818c780ce48e990e973c9df24ec6c8c0 (patch) | |
tree | 8d57b06c7921469563dbbb2e3279d3fda900c47a /pygments/lexers/text.py | |
parent | d3399178e86e83c3ffa8d0b188d0478d12c90431 (diff) | |
download | pygments-99fba293818c780ce48e990e973c9df24ec6c8c0.tar.gz |
Apply default state transition in various lexers to avoid extra token generation
Diffstat (limited to 'pygments/lexers/text.py')
-rw-r--r-- | pygments/lexers/text.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py index 10675654..8de3ded7 100644 --- a/pygments/lexers/text.py +++ b/pygments/lexers/text.py @@ -13,7 +13,7 @@ import re from bisect import bisect from pygments.lexer import Lexer, LexerContext, RegexLexer, ExtendedRegexLexer, \ - bygroups, include, using, this, do_insertions + bygroups, include, using, this, do_insertions, default from pygments.token import Punctuation, Text, Comment, Keyword, Name, String, \ Generic, Operator, Number, Whitespace, Literal from pygments.util import get_bool_opt, ClassNotFound @@ -503,7 +503,7 @@ class TexLexer(RegexLexer): 'command': [ (r'\[.*?\]', Name.Attribute), (r'\*', Keyword), - (r'', Text, '#pop'), + default('#pop'), ], } |