5712:f0d08bdeacf4 | 5713:6762afd9f963 |
---|---|
3 pygments.lexers.special | 3 pygments.lexers.special |
4 ~~~~~~~~~~~~~~~~~~~~~~~ | 4 ~~~~~~~~~~~~~~~~~~~~~~~ |
5 | 5 |
6 Special lexers. | 6 Special lexers. |
7 | 7 |
8 :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. | 8 :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. |
9 :license: BSD, see LICENSE for details. | 9 :license: BSD, see LICENSE for details. |
10 """ | 10 """ |
11 | 11 |
12 import re | 12 import re |
13 | 13 |
25 """ | 25 """ |
26 name = 'Text only' | 26 name = 'Text only' |
27 aliases = ['text'] | 27 aliases = ['text'] |
28 filenames = ['*.txt'] | 28 filenames = ['*.txt'] |
29 mimetypes = ['text/plain'] | 29 mimetypes = ['text/plain'] |
30 priority = 0.01 | |
30 | 31 |
31 def get_tokens_unprocessed(self, text): | 32 def get_tokens_unprocessed(self, text): |
32 yield 0, Text, text | 33 yield 0, Text, text |
33 | 34 |
35 def analyse_text(text): | |
36 return TextLexer.priority | |
34 | 37 |
35 _ttype_cache = {} | 38 _ttype_cache = {} |
36 | 39 |
37 line_re = re.compile(b'.*?\n') | 40 line_re = re.compile(b'.*?\n') |
38 | 41 |