summaryrefslogtreecommitdiff
path: root/pygments/formatters
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/formatters')
-rw-r--r--pygments/formatters/html.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py
index 528c981b..5acc858d 100644
--- a/pygments/formatters/html.py
+++ b/pygments/formatters/html.py
@@ -445,10 +445,10 @@ class HtmlFormatter(Formatter):
while cclass is None:
ttype = ttype.parent
cclass = getcls(ttype)
- cspan = cclass and '<span style="%s">' % c2s[cclass][0]
+ cspan = cclass and '<span style="%s">' % c2s[cclass][0] or ''
else:
cls = self._get_css_class(ttype)
- cspan = cls and '<span class="%s">' % cls
+ cspan = cls and '<span class="%s">' % cls or ''
if enc:
value = value.encode(enc)