Skip to content

Commit

Permalink
Merge pull request #20 from harishmohanraj/fix-broken-img
Browse files Browse the repository at this point in the history
Fix broken image path
  • Loading branch information
harishmohanraj authored Dec 19, 2024
2 parents 4794db3 + 7e68fe3 commit f32bf30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/process_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def resolve_path(match):
return match.group(0)

alt, rel_path = img_match.groups()
abs_path = (rendered_mdx.parent / rel_path.lstrip("./")).resolve().relative_to(website_dir)
abs_path = (rendered_mdx.parent / Path(rel_path)).resolve().relative_to(website_dir)
return f"![{alt}](/{abs_path})"

pattern = r"````mdx-code-block\n(!\[.*?\]\(.*?\))\n````"
Expand Down

0 comments on commit f32bf30

Please sign in to comment.