Commits

Anonymous committed ef5ac9c

[svn] Optimize HTML output, fix PyTb formatter.

  • Participants
  • Parent commits 67627ac
  • Branches trunk

Comments (0)

Files changed (2)

File pygments/formatters/html.py

                 else:
                     yield 1, cspan + part + (cspan and '</span>') + lsep
             # for the last line
-            if line:
+            if line and parts[-1]:
                 if lspan != cspan:
                     line += (lspan and '</span>') + cspan + parts[-1]
                     lspan = cspan
                 else:
                     line += parts[-1]
+            elif line:
+                # we neither have to open a new span nor set lspan
+                pass
             else:
                 line = cspan + parts[-1]
                 lspan = cspan

File pygments/lexers/agile.py

             (r'^(    )(.+)(\n)',
              bygroups(Text, using(PythonLexer), Text)),
             (r'^(...)(\n)',
-             bygroups(Comment, Text), '#pop'), # for doctests...
+             bygroups(Comment, Text)), # for doctests...
             (r'^(.+)(: )(.+)(\n)',
              bygroups(Name.Class, Text, Name.Identifier, Text), '#pop'),
         ],