summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pastepy.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pastepy.py b/pastepy.py
index 5e0e404..1583bed 100644
--- a/pastepy.py
+++ b/pastepy.py
@@ -46,7 +46,8 @@ class Paste(object):
rendered = []
if has_markdown:
rendered.append(('Rendered markdown', 'md-render'))
- self.lexers.append(('Rendered', rendered))
+ if len(rendered):
+ self.lexers.append(('Rendered', rendered))
self.lexers.append(('Others' if settings.categories else 'Syntax', sorted(lexers.items(), cmp = lambda a, b: cmp(a[0], b[0]))))
self.formatter = CustomHtmlFormatter(linenos = 'table', lineanchors = 'line', anchorlinenos = True)