summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pastepy/pastepy.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pastepy/pastepy.py b/pastepy/pastepy.py
index f6b68ef..e57d406 100644
--- a/pastepy/pastepy.py
+++ b/pastepy/pastepy.py
@@ -26,8 +26,11 @@ class CustomHtmlFormatter(HtmlFormatter):
yield 0, '<pre>'
line = 1
for i, t in source:
- yield i, '<span id="codeline-{}">{}</span>'.format(i, t)
- line += 1
+ if i == 1:
+ yield i, '<span id="codeline-{}">{}</span>'.format(line, t)
+ line += 1
+ else:
+ yield i, t
yield 0, '</pre>'
def init_lexers():