aboutsummaryrefslogtreecommitdiff
path: root/pyblog
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xpyblog6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyblog b/pyblog
index 75512bc9..8b500a03 100755
--- a/pyblog
+++ b/pyblog
@@ -576,12 +576,12 @@ def _pre_tag_insert_line_numbers(soup, pre_tag):
num_lines = len(pre_tag.text.split("\n"))
for line_number in range(1, num_lines + 1):
# line number divs will look like:
- # <span class="line-number" data-line="1" style="top: 0px"><!----></span>
- # <span class="line-number" data-line="2" style="top: 18px"><!----></span>
+ # <span class="line-number" data-line="1" style="top: 1px"><!----></span>
+ # <span class="line-number" data-line="2" style="top: 19px"><!----></span>
ln_tag = soup.new_tag("span")
ln_tag["class"] = "line-number"
ln_tag["data-line"] = line_number
- ln_tag["style"] = "top: %dpx" % ((line_number - 1) * CODE_LINE_HEIGHT)
+ ln_tag["style"] = "top: %dpx" % ((line_number - 1) * CODE_LINE_HEIGHT + 1)
# add a comment to the content of the span to suppress tidy5
# empty <span> tag warning
ln_tag.append(soup.new_string("", bs4.Comment))