sphinx-contrib / images

sphinxcontrib-images extension
Apache License 2.0
19 stars 16 forks source link

Fix #11: Change app.add_javascript and app.add_stylesheet #12

Closed kujiu closed 4 years ago

kujiu commented 4 years ago

These two methods will disappear with Sphinx 4.0. New ones are available since Sphinx 1.8. This commit uses the new ones if Sphinx version is >= 2.0.

jonascj commented 4 years ago

Thank you @kujiu. At present we do not test against sphinx versions older than 1.8.5 and that is for python 2.7. If add_js_file and add_css_file are available in 1.8 we could drop the version check if sphinx.__version__ > '2':. What do you think?

kujiu commented 4 years ago

Thanks for the review, I'm agree with you. You can see these methods in the documentation here: https://www.sphinx-doc.org/en/1.8/extdev/appapi.html

I added a new commit.

kujiu commented 4 years ago

Do you prefer I squash the two commits ?

jonascj commented 4 years ago

I'm indifferent, if you hadn't asked I would have just merged it as two commits. Now that you mention it I might squash them. You don't need to squash them though, I can do when I merge.

I will merge it sometime during this week.

kujiu commented 4 years ago

Ok, thanks :)

jonascj commented 4 years ago

How time flies when you have a baby and a 3-year-old! Please accept my apologies for not attending to the PRs and issues in a timely fashion. I'll attend to them at the latest on August 29th and 30th (I have another project with deadline on August 28th).