diff options
author | Ana Nelson <ana@ananelson.com> | 2011-10-02 11:36:48 -0700 |
---|---|---|
committer | Ana Nelson <ana@ananelson.com> | 2011-10-02 11:36:48 -0700 |
commit | 067693dc8c01a9635bc4dd9a33d3b8737b372347 (patch) | |
tree | e9321aef7125c8568717da49fae0835558cff986 /pygments/formatters/html.py | |
parent | f83a828ec5ff775cd313213385d4bce06efda8e6 (diff) | |
download | pygments-067693dc8c01a9635bc4dd9a33d3b8737b372347.tar.gz |
Fix specifyng the starting line number in lineanchors mode. Add tests for line numbering.
Diffstat (limited to 'pygments/formatters/html.py')
-rw-r--r-- | pygments/formatters/html.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py index 1f0ca680..f6c6400a 100644 --- a/pygments/formatters/html.py +++ b/pygments/formatters/html.py @@ -596,7 +596,7 @@ class HtmlFormatter(Formatter): def _wrap_lineanchors(self, inner): s = self.lineanchors - i = 0 + i = self.linenostart - 1 # subtract 1 since we have to increment i *before* yielding for t, line in inner: if t: i += 1 |