Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit abed7c1

Browse files
committed
Fix warnings about duplicate explicit targets.
svn path=/trunk/matplotlib/; revision=5504
1 parent 389243d commit abed7c1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

doc/sphinxext/plot_directive.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"""
1111

1212
from docutils.parsers.rst import directives
13+
import os.path
1314

1415
try:
1516
# docutils 0.4
@@ -35,7 +36,7 @@
3536
:target: %(reference)s.hires.png
3637
%(options)s
3738
38-
`[source] <%(reference)s.py>`_
39+
`[original %(basename)s.py] <%(reference)s.py>`_
3940
4041
.. latexonly::
4142
.. image:: %(reference)s.pdf
@@ -50,6 +51,7 @@ def run(arguments, options, state_machine, lineno):
5051
options = [' :%s: %s' % (key, val) for key, val in
5152
options.items()]
5253
options = "\n".join(options)
54+
basename = os.path.basename(reference)
5355
lines = template % locals()
5456
lines = lines.split('\n')
5557

0 commit comments

Comments
 (0)