summaryrefslogtreecommitdiff
path: root/pygments/lexers/fortran.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers/fortran.py')
-rw-r--r--pygments/lexers/fortran.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pygments/lexers/fortran.py b/pygments/lexers/fortran.py
index e2f95b11..5165bac0 100644
--- a/pygments/lexers/fortran.py
+++ b/pygments/lexers/fortran.py
@@ -5,7 +5,7 @@
Lexers for Fortran languages.
- :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -156,8 +156,9 @@ class FortranLexer(RegexLexer):
'nums': [
(r'\d+(?![.e])(_[a-z]\w+)?', Number.Integer),
- (r'[+-]?\d*\.\d+(e[-+]?\d+)?(_[a-z]\w+)?', Number.Float),
- (r'[+-]?\d+\.\d*(e[-+]?\d+)?(_[a-z]\w+)?', Number.Float),
+ (r'[+-]?\d*\.\d+([ed][-+]?\d+)?(_[a-z]\w+)?', Number.Float),
+ (r'[+-]?\d+\.\d*([ed][-+]?\d+)?(_[a-z]\w+)?', Number.Float),
+ (r'[+-]?\d+(\.\d*)?[ed][-+]?\d+(_[a-z]\w+)?', Number.Float),
],
}