Skip to content

Commit

Permalink
Check local links for all source suffixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier committed Feb 12, 2016
1 parent 3e60fa7 commit 28b7691
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions nbsphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,15 @@ def apply(self):
continue # Not a local link
elif uri.startswith('#'):
continue # Nothing to be done
elif uri.lower().endswith('.ipynb'):
target = uri[:-len('.ipynb')]

for suffix in env.config.source_suffix:
if uri.lower().endswith(suffix.lower()):
target = uri[:-len(suffix)]
break
else:
target = ''

if target:
target_ext = ''
reftype = 'doc'
refdomain = None
Expand Down

0 comments on commit 28b7691

Please sign in to comment.