summaryrefslogtreecommitdiff
path: root/pygments
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-10-14 10:14:07 +0200
committerGeorg Brandl <georg@python.org>2007-10-14 10:14:07 +0200
commit03c160cfd1620d9edc44dbfd298d1fc378bbb9bb (patch)
tree928372a487109a93b9feb9649e14a2f2d9ac16f8 /pygments
parent22cee7871c551162f044d17eaa6661846a500fef (diff)
downloadpygments-git-03c160cfd1620d9edc44dbfd298d1fc378bbb9bb.tar.gz
Fix a bug in the Python lexer and a bug in the HTML formatter.
Diffstat (limited to 'pygments')
-rw-r--r--pygments/formatters/html.py2
-rw-r--r--pygments/lexers/agile.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py
index 07045ef6..e8c80325 100644
--- a/pygments/formatters/html.py
+++ b/pygments/formatters/html.py
@@ -55,7 +55,7 @@ def _get_ttype_class(ttype):
CSSFILE_TEMPLATE = '''\
td.linenos { background-color: #f0f0f0; padding-right: 10px; }
span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
-pre { line-height: 125%; }
+pre { line-height: 125%%; }
%(styledefs)s
'''
diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py
index 57e92897..a909492c 100644
--- a/pygments/lexers/agile.py
+++ b/pygments/lexers/agile.py
@@ -97,7 +97,7 @@ class PythonLexer(RegexLexer):
('[uU]?"', String, combined('stringescape', 'dqs')),
("[uU]?'", String, combined('stringescape', 'sqs')),
('[a-zA-Z_][a-zA-Z0-9_]*', Name),
- (r'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),
+ (r'(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', Number.Float),
(r'0\d+', Number.Oct),
(r'0x[a-fA-F0-9]+', Number.Hex),
(r'\d+L', Number.Integer.Long),