Merge pull request #3413 from jfbu/literalincludelines

If ``:start-after:`` is used, make ``:lines:`` relative (close: #3412)
This commit is contained in:
Jean-François B
2017-02-17 09:00:40 +01:00
committed by GitHub
4 changed files with 57 additions and 34 deletions

View File

@@ -197,9 +197,8 @@ def test_literal_include_lineno_match(app, status, warning):
html = (app.outdir / 'lineno_match.html').text(encoding='utf-8')
pyobject = (
'<td class="linenos"><div class="linenodiv"><pre>'
' 9\n'
'10\n'
'11</pre></div></td>')
'6\n'
'7</pre></div></td>')
assert pyobject in html
@@ -223,6 +222,12 @@ def test_literal_include_lineno_match(app, status, warning):
'14</pre></div></td>')
assert start_after in html
start_after_with_lines = (
'<td class="linenos"><div class="linenodiv"><pre>'
'2\n'
'3</pre></div></td>')
assert start_after_with_lines in html
start_at_end_at = (
'<td class="linenos"><div class="linenodiv"><pre>'
' 9\n'