Skip to content

Commit

Permalink
Make extlinks work with older and newer sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
mstimberg committed Jun 28, 2023
1 parent 55b9715 commit 674732c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions docs_sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,5 +314,11 @@ def __getattr__(cls, name):
highlight_language = 'python' # instead of python3 (default for sphinx>=1.4)

# Configure linking to github
extlinks = {'issue': ('https://github.com/brian-team/brian2/issues/%s',
'# %s')}
import sphinx
sphinx_version = tuple(int(x) for x in sphinx.__version__.split('.'))
if sphinx_version >= (4, 0, 0):
extlinks = {'issue': ('https://github.com/brian-team/brian2/issues/%s',
'# %s')}
else:
extlinks = {'issue': ('https://github.com/brian-team/brian2/issues/%s',
'# ')}
2 changes: 1 addition & 1 deletion docs_sphinx/introduction/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This new minor release only fixes two infrastructure issues that came up with th

Selected bug fixes
~~~~~~~~~~~~~~~~~~
- Re-introduce the reference documentation, that was no longer created on https://brian2.readthedocs.org with the latest release (:issue:`1474`). Thanks to Michalis Pagkalos for making us aware of the issue.
- Re-introduce the reference documentation that was no longer created on https://brian2.readthedocs.org with the latest release (:issue:`1474`). Thanks to Michalis Pagkalos for making us aware of the issue.

Infrastructure improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit 674732c

Please sign in to comment.