summaryrefslogtreecommitdiff
path: root/pygments/formatters/html.py
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2007-02-14 18:01:49 +0100
committergbrandl <devnull@localhost>2007-02-14 18:01:49 +0100
commite7b3b9ecd21a2d3218c3ab66b9f213578a737890 (patch)
tree842e7441718624a75943b59dd226ada9b052922d /pygments/formatters/html.py
parent0dcd117d4e662c8a85aef4b312e2cb795a0e7d52 (diff)
downloadpygments-e7b3b9ecd21a2d3218c3ab66b9f213578a737890.tar.gz
[svn] Test that the HTML formatter output is complete.
Diffstat (limited to 'pygments/formatters/html.py')
-rw-r--r--pygments/formatters/html.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py
index 3b75e4e6..f3257f03 100644
--- a/pygments/formatters/html.py
+++ b/pygments/formatters/html.py
@@ -79,7 +79,7 @@ DOC_HEADER_EXTERNALCSS = '''\
<head>
<title>%(title)s</title>
<meta http-equiv="content-type" content="text/html; charset=%(encoding)s">
- <link rel="stylesheet" href="%(cssfile)s">
+ <link rel="stylesheet" href="%(cssfile)s" type="text/css">
</head>
<body>
<h2>%(title)s</h2>
@@ -465,8 +465,10 @@ class HtmlFormatter(Formatter):
line += part + (lspan and '</span>') + lsep
yield 1, line
line = ''
- else:
+ elif part:
yield 1, cspan + part + (cspan and '</span>') + lsep
+ else:
+ yield 1, lsep
# for the last line
if line and parts[-1]:
if lspan != cspan: