nyergler / hieroglyph

Generate HTML presentations from plain text sources with all the power of Sphinx.
https://hieroglyph.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
261 stars 73 forks source link

fix recently occurred type error in AbstractSlideBuilder #174

Open lpirl opened 1 year ago

lpirl commented 1 year ago

Just experienced this

$ sphinx-build -M slides "." "build" -j auto -n -a
…
/…/slides/venv/lib/python3.11/site-packages/hieroglyph/builder.py:126: RemovedInSphinx80Warning: Sphinx 8 will drop support for representing paths as strings. Use "pathlib.Path" or "os.fspath" instead.
  doctree.attributes.get('source')[len(self.srcdir) + 1:].count('/')

Exception occurred:
  File "/…/slides/venv/lib/python3.11/site-packages/hieroglyph/builder.py", line 135, in post_process_images
    if node['uri'].startswith(self.outdir):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

and think the proposed change is good enough.

Thanks for considering.