From 36b3ca467501dbe1690ece586b50f35166abd4e5 Mon Sep 17 00:00:00 2001 From: Juan Colonese <47576248+colonesej@users.noreply.github.com> Date: Tue, 17 Mar 2020 08:35:24 -0300 Subject: [PATCH] Update ipython_directive.py --- IPython/sphinxext/ipython_directive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IPython/sphinxext/ipython_directive.py b/IPython/sphinxext/ipython_directive.py index 0481624c42c..ad1a1272385 100644 --- a/IPython/sphinxext/ipython_directive.py +++ b/IPython/sphinxext/ipython_directive.py @@ -420,7 +420,7 @@ def process_image(self, decorator): # as absolute path for Sphinx # sphinx expects a posix path, even on Windows posix_path = pathlib.Path(savefig_dir,filename).as_posix() - outfile = '/' + os.path.relpath(posix_path, source_dir) + outfile = '/' + pathlib.Path(os.path.relpath(posix_path, source_dir)).as_posix() imagerows = ['.. image:: %s' % outfile]