summaryrefslogtreecommitdiff
path: root/pygments
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-11-06 09:43:22 +0100
committerGeorg Brandl <georg@python.org>2014-11-06 09:43:22 +0100
commitcaf1948c474e6e8a497df73368fe99e24247ed59 (patch)
tree59fe63225d0b0e467f72cd9fc4ef733e6218494c /pygments
parent36b3558ffc26c1c92036b66a6a635d2eaabe8e09 (diff)
downloadpygments-caf1948c474e6e8a497df73368fe99e24247ed59.tar.gz
FORTRAN: recognize cpp style preprocessor lines, fix overzealous variable highlighting
Diffstat (limited to 'pygments')
-rw-r--r--pygments/lexers/fortran.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pygments/lexers/fortran.py b/pygments/lexers/fortran.py
index 2ed89e54..ae432b88 100644
--- a/pygments/lexers/fortran.py
+++ b/pygments/lexers/fortran.py
@@ -39,10 +39,11 @@ class FortranLexer(RegexLexer):
tokens = {
'root': [
+ ('^#.*\n', Comment.Preproc),
(r'!.*\n', Comment),
include('strings'),
include('core'),
- (r'[a-z]\w*', Name.Variable),
+ # (r'[a-z]\w*', Name.Variable), # too broad
include('nums'),
(r'[\s]+', Text),
],