Skip to content

Commit

Permalink
Correctly detect ipynb files when replacing links
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Sep 16, 2024
1 parent 43b2532 commit 92630aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nbsite/gallery/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def replace_link(match):

# Do not change absolute links and non-ipynb links
parsed_url = urlparse(link)
if parsed_url.scheme != '' or parsed_url.netloc != '' or link.lower().endswith('.ipynb'):
if parsed_url.scheme != '' or parsed_url.netloc != '' or not link.lower().endswith('.ipynb'):
return match.group(0)

md_dir = os.path.dirname(os.path.abspath(filepath))
Expand Down

0 comments on commit 92630aa

Please sign in to comment.