|
From: <lee...@us...> - 2009-10-12 23:27:38
|
Revision: 7880
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7880&view=rev
Author: leejjoon
Date: 2009-10-12 23:02:27 +0000 (Mon, 12 Oct 2009)
Log Message:
-----------
fix plot_directive.py that generated incorrect links for some cases
Modified Paths:
--------------
branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py
Modified: branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py
===================================================================
--- branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py 2009-10-12 16:30:14 UTC (rev 7879)
+++ branches/v0_99_maint/lib/matplotlib/sphinxext/plot_directive.py 2009-10-12 23:02:27 UTC (rev 7880)
@@ -260,12 +260,10 @@
# the temporary directory, and then sphinx moves the file to
# build/html/_images for us later.
rstdir, rstfile = os.path.split(state_machine.document.attributes['source'])
- reldir = rstdir[len(setup.confdir)+1:]
- relparts = [p for p in os.path.split(reldir) if p.strip()]
- nparts = len(relparts)
outdir = os.path.join('plot_directive', basedir)
- linkdir = ('../' * nparts) + outdir
-
+ reldir = relpath(setup.confdir, rstdir)
+ linkdir = os.path.join(reldir, outdir)
+
# tmpdir is where we build all the output files. This way the
# plots won't have to be redone when generating latex after html.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|