summaryrefslogtreecommitdiff
path: root/pygments/lexers/text.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-01-17 06:53:47 +0100
committerGeorg Brandl <georg@python.org>2014-01-17 06:53:47 +0100
commit8d58e854aea5a0061d4fd16e409d043fc402bacc (patch)
treebba45c4c616f884d2737350be84868fab2a574cd /pygments/lexers/text.py
parent58ade6b658b910ad16f923e8376a2bb1a42625ee (diff)
parentc1559dbaaf96b70f9d7f42639dcc90c1164762a7 (diff)
downloadpygments-8d58e854aea5a0061d4fd16e409d043fc402bacc.tar.gz
Merged in jiyinyiyong/pygments-main (pull request #275)
add syntax for Cirru
Diffstat (limited to 'pygments/lexers/text.py')
-rw-r--r--pygments/lexers/text.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py
index 2635906e..c4015680 100644
--- a/pygments/lexers/text.py
+++ b/pygments/lexers/text.py
@@ -5,7 +5,7 @@
Lexers for non-source code file types.
- :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -180,7 +180,7 @@ class MakefileLexer(Lexer):
name = 'Makefile'
aliases = ['make', 'makefile', 'mf', 'bsdmake']
- filenames = ['*.mak', 'Makefile', 'makefile', 'Makefile.*', 'GNUmakefile']
+ filenames = ['*.mak', '*.mk', 'Makefile', 'makefile', 'Makefile.*', 'GNUmakefile']
mimetypes = ['text/x-makefile']
r_special = re.compile(r'^(?:'
@@ -207,6 +207,11 @@ class MakefileLexer(Lexer):
for item in do_insertions(ins, lex.get_tokens_unprocessed(done)):
yield item
+ def analyse_text(text):
+ # Many makefiles have $(BIG_CAPS) style variables
+ if re.search(r'\$\([A-Z_]+\)', text):
+ return 0.1
+
class BaseMakefileLexer(RegexLexer):
"""