Skip to content

Commit

Permalink
Add handling of images for asciidoc and rst
Browse files Browse the repository at this point in the history
  • Loading branch information
jayqi committed Jun 27, 2020
1 parent e30d287 commit 3604b46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nbautoexport/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def postprocess(self, input: str):
with new_path.open("w") as f:
f.write(re.sub(r"\n#\sIn\[(([0-9]+)|(\s))\]:\n{2}", "", text))

# For markdown files, we also need to move the assets directory, for stuff like images
if self.export_format == ExportFormat.markdown:
# For some formats, we also need to move the assets directory, for stuff like images
if self.export_format in [ExportFormat.asciidoc, ExportFormat.markdown, ExportFormat.rst]:
assets_dir = input.parent / f"{input.stem}_files"
assets_dir.replace(new_dir / f"{input.stem}_files")

Expand Down

0 comments on commit 3604b46

Please sign in to comment.