summaryrefslogtreecommitdiff
path: root/tests/test_directive_code.py
diff options
context:
space:
mode:
authorjfbu <jfbu@free.fr>2016-04-07 11:27:33 +0200
committerjfbu <jfbu@free.fr>2016-04-07 11:27:33 +0200
commit261ff1a9d2f1794f72c275718f31555089fd7e99 (patch)
treee8c8deb916e7c771b04298979f4a153a3ce25a12 /tests/test_directive_code.py
parent238a3346d912c85a018f7836789383f8230aebfc (diff)
downloadsphinx-git-261ff1a9d2f1794f72c275718f31555089fd7e99.tar.gz
Enable pdf hyperlinks to named literal-blocks without caption.
This is tango between latex.py and sphinx.sty to handle PDF hyperlinks to literal-blocks (both code-block and literalinclude) either with name or caption (then numref can be used) or both. modified: sphinx/texinputs/sphinx.sty modified: sphinx/writers/latex.py This test file is now back to original. modified: tests/test_directive_code.py
Diffstat (limited to 'tests/test_directive_code.py')
-rw-r--r--tests/test_directive_code.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_directive_code.py b/tests/test_directive_code.py
index 59a440b53..6f7b749b1 100644
--- a/tests/test_directive_code.py
+++ b/tests/test_directive_code.py
@@ -64,7 +64,7 @@ def test_code_block_caption_html(app, status, warning):
def test_code_block_caption_latex(app, status, warning):
app.builder.build_all()
latex = (app.outdir / 'Python.tex').text(encoding='utf-8')
- caption = '\\SphinxSetupCaptionForVerbatim{literal-block}{\label{caption:caption-test-rb}caption \\emph{test} rb}'
+ caption = '\\SphinxSetupCaptionForVerbatim{literal-block}{caption \\emph{test} rb}'
assert caption in latex
@@ -229,7 +229,7 @@ def test_literalinclude_caption_html(app, status, warning):
def test_literalinclude_caption_latex(app, status, warning):
app.builder.build('index')
latex = (app.outdir / 'Python.tex').text(encoding='utf-8')
- caption = '\\SphinxSetupCaptionForVerbatim{literal-block}{\label{caption:caption-test-py}caption \\textbf{test} py}'
+ caption = '\\SphinxSetupCaptionForVerbatim{literal-block}{caption \\textbf{test} py}'
assert caption in latex