Skip to content

Commit

Permalink
fix: image inclusion in subdirectories
Browse files Browse the repository at this point in the history
replace relative image paths with absolute ones
closes DCsunset#54
  • Loading branch information
FynnFreyer committed Aug 2, 2024
1 parent 89a9cf7 commit 7591604
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandoc_include/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ def action(elem, doc):
if os.path.isabs(url):
return

# rewrite relative path
elem.url = os.path.join(options["current-path"], url)
# rewrite relative to absolute path
elem.url = os.path.abspath(url)


def main(doc=None):
Expand Down

0 comments on commit 7591604

Please sign in to comment.