diff options
-rw-r--r-- | pastepy.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) |