Skip to content

Commit

Permalink
Fix Broken PDF Scraping in Sphinx
Browse files Browse the repository at this point in the history
This might be caused by a refactor that PyMuPDF is currently doing. This
library is used to read the OMG spec table of contents to get the links.
I could look into this further to see if this was intentional or a bug,
but the fix seems to be trivial.
  • Loading branch information
iguessthislldo committed Jan 18, 2024
1 parent 31db4a1 commit e943d9e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/sphinx_extensions/links.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,10 @@ def add_omg_spec(app, slug, version, our_name=None, display_name=None):
if kind == fitz.LINK_GOTO:
loc = 'page={}&view=FitH,{}'.format(page, dest['to'].y)
elif kind == fitz.LINK_NAMED:
loc = dest['name']
if 'name' in dest:
loc = dest['name']
else:
loc = dest['nameddest']
else:
continue

Expand Down

0 comments on commit e943d9e

Please sign in to comment.