Commits

Anonymous committed 7806433

Fix a bug in the Python lexer and a bug in the HTML formatter.

Comments (0)

Files changed (3)

pygments/formatters/html.py

 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
 '''
 

pygments/lexers/agile.py

             ('[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),
                  if (entry.startswith('test_') and entry.endswith('.py'))]
         files.sort()
 
-    WIDTH = 80
+    WIDTH = 85
 
     print >>sys.stderr, \
         ('Pygments %s Test Suite running%s, stand by...' %