summaryrefslogtreecommitdiff
path: root/pygments/lexers/fortran.py
diff options
context:
space:
mode:
authorMarshall Ward <marshall.ward@gmail.com>2018-01-06 11:45:30 +1100
committerMarshall Ward <marshall.ward@gmail.com>2018-01-06 11:45:30 +1100
commitd078b44d0b23e7665788acb7d454e29aa4b77b9f (patch)
treebf1caee4dd314c381ed51990f2bbcb295d980a37 /pygments/lexers/fortran.py
parent74e843beb1c4d8329f2a693143617831f6fd68ec (diff)
downloadpygments-git-d078b44d0b23e7665788acb7d454e29aa4b77b9f.tar.gz
Safer Fortran E-notation without decimal
Fortran e-notation values without decimal now require the presence of e (or d) and at least one exponent value.
Diffstat (limited to 'pygments/lexers/fortran.py')
-rw-r--r--pygments/lexers/fortran.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/fortran.py b/pygments/lexers/fortran.py
index 61b8aaeb..5165bac0 100644
--- a/pygments/lexers/fortran.py
+++ b/pygments/lexers/fortran.py
@@ -158,7 +158,7 @@ class FortranLexer(RegexLexer):
(r'\d+(?![.e])(_[a-z]\w+)?', Number.Integer),
(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),
+ (r'[+-]?\d+(\.\d*)?[ed][-+]?\d+(_[a-z]\w+)?', Number.Float),
],
}