Skip to content

Commit

Permalink
Merge branch 'master' into fix_cell_output_renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Jan 3, 2022
2 parents 91f5194 + 2baade0 commit 15ad46a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions myst_nb/render_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,10 @@ def _render_image(output: NotebookNode, index: int):
# directory, so make a relative path, which Sphinx treats
# as being relative to the current working directory.
filename = os.path.basename(output.metadata["filenames"][mime_type])

# checks if file dir path is inside a subdir of dir
filedir = os.path.dirname(output.metadata["filenames"][mime_type])
subpaths = filedir.split(self.sphinx_dir)
outbasedir = os.path.abspath(self.sphinx_dir)
subpaths = filedir.split(outbasedir)
final_dir = self.sphinx_dir
if subpaths and len(subpaths) > 1:
subpath = subpaths[1]
Expand Down

0 comments on commit 15ad46a

Please sign in to comment.